[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 2 01:07:07 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 HEAD~1 HEAD --extensions cpp -- clang/lib/Lex/DependencyDirectivesScanner.cpp clang/unittests/Lex/DependencyDirectivesScannerTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Lex/DependencyDirectivesScanner.cpp b/clang/lib/Lex/DependencyDirectivesScanner.cpp
index a154ae599..1b302a726 100644
--- a/clang/lib/Lex/DependencyDirectivesScanner.cpp
+++ b/clang/lib/Lex/DependencyDirectivesScanner.cpp
@@ -419,7 +419,7 @@ static bool isQuoteCppDigitSeparator(const char *const Start,
 }
 
 void Scanner::skipLine(const char *&First, const char *const End) {
-  const char * const OldFirst = First;
+  const char *const OldFirst = First;
   for (;;) {
     assert(First <= End);
     if (First == End)

``````````

</details>


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


More information about the cfe-commits mailing list