[clang] [analyzer] Remove double spaces after sentence endings in emitted diagnostics (PR #228777)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 06:11:45 PDT 2026


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 c,cpp -- clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp clang/lib/StaticAnalyzer/Core/BugReporter.cpp clang/test/Analysis/const-method-call.cpp clang/test/Analysis/cxx-uninitialized-object-ptr-ref.cpp clang/test/Analysis/dangling-ptr-deref.cpp clang/test/Analysis/diagnostics/track_subexpressions.cpp clang/test/Analysis/incorrect-checker-names.cpp clang/test/Analysis/loop-widening-notes.cpp clang/test/Analysis/loop-widening.cpp clang/test/Analysis/return-ptr-range.cpp clang/test/Analysis/stack-addr-ps.cpp clang/test/Analysis/stackaddrleak.c clang/test/Analysis/stackaddrleak.cpp clang/test/Analysis/track-control-dependency-conditions.cpp clang/test/Analysis/use-after-move.cpp --diff_from_common_commit
``````````

: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/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
index 0a55d1da7..92a4c5945 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
@@ -436,7 +436,7 @@ void UnixAPIMisuseChecker::CheckPthreadOnce(CheckerContext &C,
   else
     os << " stack allocated memory";
   os << " for the \"control\" value. Using such transient memory for "
-  "the control value is potentially dangerous.";
+        "the control value is potentially dangerous.";
   if (isa<VarRegion>(R) && R->hasMemorySpace<StackLocalsSpaceRegion>(state))
     os << "  Perhaps you intended to declare the variable as 'static'?";
 

``````````

</details>


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


More information about the cfe-commits mailing list