================ @@ -160,6 +160,8 @@ static char GetFirstChar(const Preprocessor &PP, const Token &Tok) { bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) const { + if (PrevTok.is(tok::annot_module_name)) + return false; ---------------- yronglin wrote:
This change was used to solve the issue in preprocessing output: ```C++ import non_exist_modules; ``` clang++ -E -std=c++20 main.cppm Without this change, we will get: ```C++ import non_exist_modules ; ``` There has a extra whitespace between `non_exist_modules` and ':', because `TokenConcatenation::AvoidConcat` return s true. Also this issue will cause 2 tests broken. ``` Failed Tests (2): Clang :: Driver/crash-report-modules.m Clang :: Modules/preprocess-named-modules.cppm ``` https://github.com/llvm/llvm-project/pull/90574 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits