[Lldb-commits] [clang] [lldb] [lldb] Re-use clang's keyword enable/disable mechanism in CPlusPlusNameParser.cpp (PR #164284)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 21 07:06:18 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 {
----------------
Michael137 wrote:
> I don't mind splitting it but that PR won't make sense without the context of this PR
I don't have a huge preference. Typically we split out cross-project changes into separate PRs. It makes the area maintainers more likely to review it in time (just based filtering email subjects) and has the benefit of making the main non-NFC PR smaller. You can always just reference this PR as a motivating example.
> I can't reference FLAGS as clang::FLAGS because some of the KEYWORD() declaration's in TokenKinds.def are the | of multiple values such as BOOLSUPPORT|KEYC23 and I'd need the namespace to appear on each identifier. enum class is ruled out for the same reason, and enum class combined with using enum ... requires C++20 and therefore can't be used.
Can't we just do `using namespace clang` inside that LLDB function then?
https://github.com/llvm/llvm-project/pull/164284
More information about the lldb-commits
mailing list