aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclBase.h4
-rw-r--r--test/Modules/Inputs/cxx-inline-namespace.h11
-rw-r--r--test/Modules/Inputs/module.map4
-rw-r--r--test/Modules/cxx-inline-namespace.cpp6
4 files changed, 23 insertions, 2 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index ef220745a8..5a9e9fedfa 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -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);
}
diff --git a/test/Modules/Inputs/cxx-inline-namespace.h b/test/Modules/Inputs/cxx-inline-namespace.h
new file mode 100644
index 0000000000..2525ad3569
--- /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 eeb8d158e5..f219036e21 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -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"
+}
diff --git a/test/Modules/cxx-inline-namespace.cpp b/test/Modules/cxx-inline-namespace.cpp
new file mode 100644
index 0000000000..5b967901b3
--- /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'}}