diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-03 07:57:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-03 07:57:53 +0000 |
commit | a038c1dcface5a404d540a0d0688962cbe656af9 (patch) | |
tree | 67dab9b1c1459092dfcd7231f1681efebf428b6f /test/PCH/cxx-namespaces.cpp | |
parent | 1139da148e44193a71585f418be96ef9c5f6defa (diff) |
When setting the anonymous namespace at PCH reading, it may still be initializing so avoid
the invariant checks at NamespaceDecl::setAnonymousNamespace().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH/cxx-namespaces.cpp')
-rw-r--r-- | test/PCH/cxx-namespaces.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/PCH/cxx-namespaces.cpp b/test/PCH/cxx-namespaces.cpp new file mode 100644 index 0000000000..0fd3de7f6c --- /dev/null +++ b/test/PCH/cxx-namespaces.cpp @@ -0,0 +1,10 @@ +// Test this without pch. +// RUN: %clang_cc1 -include %S/cxx-namespaces.h -fsyntax-only -verify %s + +// Test with pch. +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-namespaces.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s + +void m() { + N::x = 0; +} |