Added some strength to the checks that prevent
"id" from being found by the parser as an
externally-defined type. Before, "id" would
sometimes make it through if it was defined in
a namespace, but this sometimes caused
confusion, for example when it conflicted with
std::locale::id.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146891 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index 1f84185..d368408 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -574,12 +574,13 @@
TypeList types;
SymbolContext null_sc;
+ if (name == id_name || name == Class_name)
+ break;
+
if (module_sp && namespace_decl)
module_sp->FindTypes(null_sc, name, &namespace_decl, true, 1, types);
- else if(name != id_name && name != Class_name)
+ else
m_target->GetImages().FindTypes(null_sc, name, true, 1, types);
- else
- break;
if (types.GetSize())
{