r174931 - Remove an assert which triggers when a decl context in a module hits the 'has
Richard Smith
richard-llvm at metafoo.co.uk
Mon Feb 11 18:32:36 PST 2013
Author: rsmith
Date: Mon Feb 11 20:32:35 2013
New Revision: 174931
URL: http://llvm.org/viewvc/llvm-project?rev=174931&view=rev
Log:
Remove an assert which triggers when a decl context in a module hits the 'has
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.
Added:
cfe/trunk/test/Modules/Inputs/cxx-inline-namespace.h
cfe/trunk/test/Modules/cxx-inline-namespace.cpp
Modified:
cfe/trunk/include/clang/AST/DeclBase.h
cfe/trunk/test/Modules/Inputs/module.map
Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=174931&r1=174930&r2=174931&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Mon Feb 11 20:32:35 2013
@@ -1477,9 +1477,9 @@ public:
// Low-level accessors
/// \brief Mark the lookup table as needing to be built. This should be
- /// used only if setHasExternalLexicalStorage() has been called.
+ /// used only if setHasExternalLexicalStorage() has been called on any
+ /// decl context for which this is the primary context.
void setMustBuildLookupTable() {
- assert(ExternalLexicalStorage && "Requires external lexical storage");
LookupPtr.setInt(true);
}
Added: cfe/trunk/test/Modules/Inputs/cxx-inline-namespace.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/cxx-inline-namespace.h?rev=174931&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Inputs/cxx-inline-namespace.h (added)
+++ cfe/trunk/test/Modules/Inputs/cxx-inline-namespace.h Mon Feb 11 20:32:35 2013
@@ -0,0 +1,11 @@
+namespace std {
+ inline namespace __1 {
+ namespace __is_function_imp {}
+ }
+}
+
+namespace std {
+ inline namespace __1 {
+ typedef int size_t;
+ }
+}
Modified: cfe/trunk/test/Modules/Inputs/module.map
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/module.map?rev=174931&r1=174930&r2=174931&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Inputs/module.map (original)
+++ cfe/trunk/test/Modules/Inputs/module.map Mon Feb 11 20:32:35 2013
@@ -175,3 +175,7 @@ module ignored_macros {
module cxx_many_overloads {
header "cxx-many-overloads.h"
}
+
+module cxx_inline_namespace {
+ header "cxx-inline-namespace.h"
+}
Added: cfe/trunk/test/Modules/cxx-inline-namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/cxx-inline-namespace.cpp?rev=174931&view=auto
==============================================================================
--- cfe/trunk/test/Modules/cxx-inline-namespace.cpp (added)
+++ cfe/trunk/test/Modules/cxx-inline-namespace.cpp Mon Feb 11 20:32:35 2013
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
+
+ at import cxx_inline_namespace;
+
+T x; // expected-error {{unknown type name 'T'}}
More information about the cfe-commits
mailing list