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

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 09:21:33 PDT 2024


================
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token &Result) {
     // This token is injected to represent the translation of '#include "a.h"'
     // into "import a.h;". Mimic the notional ';'.
     case tok::annot_module_include:
+    case tok::annot_repl_input_end:
----------------
yronglin wrote:

This change was used to solve a clang-repl issue.
```sh
Failed Tests (1):
  Clang :: Interpreter/cxx20-modules.cppm
```
It's possible a bug. IIUC, we should reset states like `ModuleDeclState` when we meet a `tok::annot_repl_input_end` token in preprocessor.

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


More information about the cfe-commits mailing list