[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 12:00:16 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) &&
----------------
cor3ntin wrote:

Can you explain these two options? I would expect that to be `CPlusPlusModules`

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


More information about the cfe-commits mailing list