Handle static_assert inside functions.

llvm-svn: 90461
This commit is contained in:
Anders Carlsson 2009-12-03 17:26:31 +00:00
parent 580cd4a23e
commit ce2cd01647
2 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,7 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
case Decl::Using: // using X; [C++]
case Decl::UsingShadow:
case Decl::UsingDirective: // using namespace X; [C++]
case Decl::StaticAssert: // static_assert(X, ""); [C++0x]
// None of these decls require codegen support.
return;

View File

@ -1,3 +1,7 @@
// RUN: clang-cc %s -emit-llvm -o - -std=c++0x
// RUN: clang-cc %s -emit-llvm -o - -std=c++0x -verify
static_assert(true, "");
void f() {
static_assert(true, "");
}