[Lldb-commits] [clang] [lldb] [lldb] Re-use clang's keyword enable/disable mechanism in CPlusPlusNameParser.cpp (PR #164284)

Daniel Sanders via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 27 14:56:55 PDT 2025


================
@@ -46,6 +46,59 @@ class LangOptions;
 class MultiKeywordSelector;
 class SourceLocation;
 
+// This is an inline namespace to allow both clang and lldb to use them without
+// namespace prefixes (via `using namespace` in lldb's case).
+inline namespace TokenKeyEnumerators {
----------------
dsandersllvm wrote:

Separated out the clang portion into https://github.com/llvm/llvm-project/pull/165323. The commits are still in this PR as it's a dependency for this to work

> Can't we just do using namespace clang inside that LLDB function then?

I've switched it to `using namespace clang`. I assume lldb is generally not doing that because of name collisions and wanting to know when it's using other components but this is at least scoped to a small function so it should still be fine from that perspective

https://github.com/llvm/llvm-project/pull/164284


More information about the lldb-commits mailing list