[clang] Reapply "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #102135)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 6 06:09:29 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff f2f410ca1317e7d2da89be0729a63a26ca83e7d7 581160a121fca5796bff2392d9228207d37e6f16 --extensions h,cpp,cppm -- clang/test/CXX/cpp/cpp.module/p2.cppm clang/include/clang/Basic/IdentifierTable.h clang/include/clang/Lex/Lexer.h clang/include/clang/Lex/Preprocessor.h clang/include/clang/Lex/Token.h clang/include/clang/Lex/TokenLexer.h clang/include/clang/Parse/Parser.h clang/lib/Basic/IdentifierTable.cpp clang/lib/Frontend/PrintPreprocessedOutput.cpp clang/lib/Lex/Lexer.cpp clang/lib/Lex/PPLexerChange.cpp clang/lib/Lex/PPMacroExpansion.cpp clang/lib/Lex/Preprocessor.cpp clang/lib/Lex/TokenConcatenation.cpp clang/lib/Lex/TokenLexer.cpp clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/Parser.cpp clang/test/CXX/basic/basic.link/p3.cpp clang/test/CXX/lex/lex.pptoken/p3-2a.cpp clang/test/CXX/module/basic/basic.link/module-declaration.cpp clang/test/CXX/module/dcl.dcl/dcl.module/dcl.module.import/p1.cppm clang/test/SemaCXX/modules.cppm
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Lex/Lexer.h b/clang/include/clang/Lex/Lexer.h
index 142f3f0538..4777609f17 100644
--- a/clang/include/clang/Lex/Lexer.h
+++ b/clang/include/clang/Lex/Lexer.h
@@ -751,9 +751,9 @@ private:
bool LexCharConstant (Token &Result, const char *CurPtr,
tok::TokenKind Kind);
bool LexEndOfFile (Token &Result, const char *CurPtr);
- bool SkipWhitespace (Token &Result, const char *CurPtr);
- bool SkipLineComment (Token &Result, const char *CurPtr);
- bool SkipBlockComment (Token &Result, const char *CurPtr);
+ bool SkipWhitespace(Token &Result, const char *CurPtr);
+ bool SkipLineComment(Token &Result, const char *CurPtr);
+ bool SkipBlockComment(Token &Result, const char *CurPtr);
bool SaveLineComment (Token &Result, const char *CurPtr);
bool IsStartOfConflictMarker(const char *CurPtr);
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index f4c28b7cf6..c6f1709aa8 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -617,8 +617,8 @@ private:
void handleModuleName(Token ModuleName) {
assert(ModuleName.is(tok::annot_module_name) && "Expect a module name");
if (isModuleCandidate()) {
- Name = ModuleName.getAnnotationValueAs<ModuleNameInfo *>()
- ->getFlatName();
+ Name =
+ ModuleName.getAnnotationValueAs<ModuleNameInfo *>()->getFlatName();
} else if (!isNamedModule())
reset();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/102135
More information about the cfe-commits
mailing list