evgeny777 created this revision. evgeny777 added a reviewer: clayborg. evgeny777 added subscribers: lldb-commits, KLapshin.
The check for already searched namespaces has disappeared from DeclContextFindDeclByName() recently. This breaks variable evaluation in many cases, for example in this one ``` namespace ns1 { int var = 100; } namespace ns2 { int var = 101; } int main(void) { { using namespace ns1; printf("var=%d\n", var); // evaluation fails - multiple candidates } { using namespace ns2; printf("var=%d\n", var); // evaluation fails - multiple candidates } } ``` http://reviews.llvm.org/D14542 Files: source/Symbol/ClangASTContext.cpp Index: source/Symbol/ClangASTContext.cpp =================================================================== --- source/Symbol/ClangASTContext.cpp +++ source/Symbol/ClangASTContext.cpp @@ -9097,6 +9097,8 @@ for (auto it = search_queue.find(decl_context); it != search_queue.end(); it++) { + if (searched.find(it->second) != searched.end()) + continue; searched.insert(it->second); symbol_file->ParseDeclsForContext(CompilerDeclContext(this, it->second));
Index: source/Symbol/ClangASTContext.cpp =================================================================== --- source/Symbol/ClangASTContext.cpp +++ source/Symbol/ClangASTContext.cpp @@ -9097,6 +9097,8 @@ for (auto it = search_queue.find(decl_context); it != search_queue.end(); it++) { + if (searched.find(it->second) != searched.end()) + continue; searched.insert(it->second); symbol_file->ParseDeclsForContext(CompilerDeclContext(this, it->second));
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits