[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 16:18:51 PDT 2024
================
@@ -862,6 +862,15 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) {
ModuleImportExpectsIdentifier = true;
CurLexerCallback = CLK_LexAfterModuleImport;
}
+
+ if ((II.isModulesDeclaration() || Identifier.is(tok::kw_module)) &&
+ !InMacroArgs && !DisableMacroExpansion &&
+ (getLangOpts().Modules || getLangOpts().DebuggerSupport) &&
----------------
yronglin wrote:
Good catch! This is definitely a mistake. It should be `CPlusPlusModules `. And the `DebuggerSupport` was used for debug mode, I followed what `import` doing.
https://github.com/llvm/llvm-project/pull/90574
More information about the cfe-commits
mailing list