mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 09:16:06 +00:00

One problem in clang-tidy and other clang tools face is that there is no way to lookup an arbitrary name in the AST, that's buried deep inside Sema and might not even be what the user wants as the new name may be freshly inserted and not available in the AST. A common use case for lookups is replacing one nested name with another while minimizing namespace qualifications, so replacing 'ns::foo' with 'ns::bar' will use just 'bar' if we happen to be inside the namespace 'ns'. This adds a little helper utility for exactly that use case. Differential Revision: http://reviews.llvm.org/D13931 llvm-svn: 251022