[clang] [ObjC] Handle @import directive as a pp-directive (PR #157726)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 9 10:55:03 PDT 2025


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 origin/main HEAD --extensions cpp,cppm,h -- clang/test/CXX/module/cpp.pre/p1.cpp clang/examples/AnnotateFunctions/AnnotateFunctions.cpp clang/include/clang/Basic/IdentifierTable.h clang/include/clang/Basic/TokenKinds.h clang/include/clang/Frontend/CompilerInstance.h clang/include/clang/Lex/CodeCompletionHandler.h clang/include/clang/Lex/ModuleLoader.h clang/include/clang/Lex/Preprocessor.h clang/include/clang/Lex/Token.h clang/include/clang/Parse/Parser.h clang/lib/Basic/IdentifierTable.cpp clang/lib/Basic/TokenKinds.cpp clang/lib/Frontend/CompilerInstance.cpp clang/lib/Lex/DependencyDirectivesScanner.cpp clang/lib/Lex/Lexer.cpp clang/lib/Lex/PPDirectives.cpp clang/lib/Lex/PPLexerChange.cpp clang/lib/Lex/Pragma.cpp clang/lib/Lex/Preprocessor.cpp clang/lib/Lex/TokenLexer.cpp clang/lib/Parse/Parser.cpp clang/lib/Sema/SemaModule.cpp clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp clang/test/CXX/basic/basic.link/p3.cpp clang/test/CXX/basic/basic.scope/basic.scope.namespace/p2.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/Modules/pr121066.cpp clang/test/Modules/pr62359.cppm clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp clang/unittests/Lex/DependencyDirectivesScannerTest.cpp clang/unittests/Lex/ModuleDeclStateTest.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index b95fa0a66..44bf97c99 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -2332,7 +2332,6 @@ public:
     }
   }
 
-
   /// Check whether the next pp-token is one of the specificed token kind. this
   /// method should have no observable side-effect on the lexed tokens.
   template <typename... Ts> bool isNextPPTokenOneOf(Ts... Ks) {

``````````

</details>


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


More information about the cfe-commits mailing list