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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174931 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index ef22074..5a9e9fe 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -1477,9 +1477,9 @@
// 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);
}
diff --git a/test/Modules/Inputs/cxx-inline-namespace.h b/test/Modules/Inputs/cxx-inline-namespace.h
new file mode 100644
index 0000000..2525ad3
--- /dev/null
+++ b/test/Modules/Inputs/cxx-inline-namespace.h
@@ -0,0 +1,11 @@
+namespace std {
+ inline namespace __1 {
+ namespace __is_function_imp {}
+ }
+}
+
+namespace std {
+ inline namespace __1 {
+ typedef int size_t;
+ }
+}
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map
index eeb8d15..f219036 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -175,3 +175,7 @@
module cxx_many_overloads {
header "cxx-many-overloads.h"
}
+
+module cxx_inline_namespace {
+ header "cxx-inline-namespace.h"
+}
diff --git a/test/Modules/cxx-inline-namespace.cpp b/test/Modules/cxx-inline-namespace.cpp
new file mode 100644
index 0000000..5b96790
--- /dev/null
+++ b/test/Modules/cxx-inline-namespace.cpp
@@ -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
+
+@import cxx_inline_namespace;
+
+T x; // expected-error {{unknown type name 'T'}}