llvm-project/lldb/source/Symbol
Dawn Perchik b59257841e Fix scope-based lookup when more than one function is found.
When multiple functions are found by name, lldb removes duplicate entries of
functions with the same type, so the first function in the symbol context list
is chosen, even if it isn't in scope. This patch uses the declaration context
of the execution context to select the function which is in scope.

This fixes cases like the following:

    int func();
    namespace ns {
	int func();
	void here() {
	    // Run to BP here and eval 'p func()';
	    // lldb used to find ::func(), now finds ns::func().
	}
    }

Reviewed by: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15312

llvm-svn: 255439
2015-12-12 19:31:41 +00:00
..
ArmUnwindInfo.cpp Fix several issues around .ARM.exidx section handling 2015-10-02 11:58:26 +00:00
Block.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CMakeLists.txt Testcase and fix for bug 24074 2015-10-08 09:45:41 +00:00
ClangASTContext.cpp Fix scope-based lookup when more than one function is found. 2015-12-12 19:31:41 +00:00
ClangASTImporter.cpp Trying to submit 254476 one more time. This implement -gmodule debugging support. 2015-12-08 01:02:08 +00:00
ClangExternalASTSourceCallbacks.cpp Trying to submit 254476 one more time. This implement -gmodule debugging support. 2015-12-08 01:02:08 +00:00
ClangExternalASTSourceCommon.cpp Fixed an unfortunate reversed conditional that 2014-12-06 02:31:49 +00:00
CompactUnwindInfo.cpp Clean up register naming conventions inside lldb. 2015-09-15 23:20:34 +00:00
CompileUnit.cpp Move things from the LanguageRuntime that obviously belong in the new Language plugin instead. 2015-09-02 01:06:46 +00:00
CompilerDecl.cpp Fixed TypeMemberFunctionImpl to not use clang types directly but use the new CompilerDecl class to do the job in an abstract way. 2015-11-10 17:47:04 +00:00
CompilerDeclContext.cpp Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName. 2015-12-08 18:39:50 +00:00
CompilerType.cpp Rework the way in which ValueObjectChild decides how to update itself; this is a slight refactoring that I need as part of a larger master plan. As such, should be NFC 2015-11-09 23:07:55 +00:00
DWARFCallFrameInfo.cpp Clean up register naming conventions inside lldb. 2015-09-15 23:20:34 +00:00
Declaration.cpp For some reason, sometimes the directory paths that clang emits have internal 2014-11-15 01:54:26 +00:00
FuncUnwinders.cpp Add support for .ARM.exidx unwind information 2015-09-30 13:50:14 +00:00
Function.cpp Introudce a IsTopLevelFunction() API on Language and Function 2015-09-30 23:12:22 +00:00
GoASTContext.cpp Add a way for source languages to "mark" ValueObjects with language-specific flags 2015-11-09 19:27:34 +00:00
LineEntry.cpp DWARF says line number 0 is a valid line number - used to indicate a source line that should 2013-09-27 01:15:46 +00:00
LineTable.cpp Fix prologue end handling when code compiled by gcc 2015-09-16 12:36:37 +00:00
Makefile
ObjectFile.cpp Fix in-memory section loading for JIT-ed code. 2015-12-03 19:41:21 +00:00
Symbol.cpp Make many mangled functions that might demangle a name be allowed to specify a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. 2015-07-08 22:32:23 +00:00
SymbolContext.cpp Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list. 2015-11-19 23:10:45 +00:00
SymbolFile.cpp Trying to submit 254476 one more time. This implement -gmodule debugging support. 2015-12-08 01:02:08 +00:00
SymbolVendor.cpp Trying to submit 254476 one more time. This implement -gmodule debugging support. 2015-12-08 01:02:08 +00:00
Symtab.cpp Revert change comitted in accidentally as r251992 2015-11-03 22:31:50 +00:00
Type.cpp Remove default case in switch which covers all enumeration values 2015-12-08 20:50:35 +00:00
TypeList.cpp Testcase and fix for bug 24074 2015-10-08 09:45:41 +00:00
TypeMap.cpp Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list. 2015-11-19 23:10:45 +00:00
TypeSystem.cpp Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName. 2015-12-08 18:39:50 +00:00
UnwindPlan.cpp Improve instruction emulation based stack unwinding on ARM 2015-06-24 11:27:32 +00:00
UnwindTable.cpp Add support for .ARM.exidx unwind information 2015-09-30 13:50:14 +00:00
Variable.cpp Rename clang_type -> compiler_type for variables. 2015-09-24 03:54:50 +00:00
VariableList.cpp Fix resolution conflict between global and class static variables in C++ 2015-08-18 22:46:57 +00:00
VerifyDecl.cpp