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,h -- 
clang/include/clang/Analysis/MacroExpansionContext.h 
clang/include/clang/Analysis/PathDiagnostic.h 
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h 
clang/lib/Analysis/MacroExpansionContext.cpp 
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp 
clang/test/Analysis/analyzer-config.c 
clang/unittests/Analysis/MacroExpansionContextTest.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/include/clang/Analysis/MacroExpansionContext.h 
b/clang/include/clang/Analysis/MacroExpansionContext.h
index f9a69c84b..3b462d953 100644
--- a/clang/include/clang/Analysis/MacroExpansionContext.h
+++ b/clang/include/clang/Analysis/MacroExpansionContext.h
@@ -99,11 +99,12 @@ public:
   /// \param MacroExpansionLoc Must be the expansion location of a macro.
   /// \param ShouldFormatMacrosPlist Whether to format the expanded text for
   ///         better readability in plist diagnostics.
-  /// \return A formatted representation of the textual representation of the 
+  /// \return A formatted representation of the textual representation of the
   ///         token sequence which was substituted in place of the macro.
   ///         If no macro was expanded at that location, returns std::nullopt.
-  std::optional<StringRef> 
-  getFormattedExpandedText(SourceLocation MacroExpansionLoc, bool 
ShouldFormatMacrosPlist) const;
+  std::optional<StringRef>
+  getFormattedExpandedText(SourceLocation MacroExpansionLoc,
+                           bool ShouldFormatMacrosPlist) const;
 
   LLVM_DUMP_METHOD void dumpExpansionRangesToStream(raw_ostream &OS) const;
   LLVM_DUMP_METHOD void dumpExpandedTextsToStream(raw_ostream &OS) const;
diff --git a/clang/unittests/Analysis/MacroExpansionContextTest.cpp 
b/clang/unittests/Analysis/MacroExpansionContextTest.cpp
index 7ea7131fe..f79a5027b 100644
--- a/clang/unittests/Analysis/MacroExpansionContextTest.cpp
+++ b/clang/unittests/Analysis/MacroExpansionContextTest.cpp
@@ -414,7 +414,8 @@ TEST_F(MacroExpansionContextTest, 
FormattedExpandedTextNoneWhenNoExpansion) {
   EXPECT_FALSE(Ctx->getFormattedExpandedText(at(3, 3), true).has_value());
 }
 
-TEST_F(MacroExpansionContextTest, 
FormattedExpandedTextKeepsOriginalWhenStable) {
+TEST_F(MacroExpansionContextTest,
+       FormattedExpandedTextKeepsOriginalWhenStable) {
   const auto Ctx = getMacroExpansionContextFor(R"code(
   #define ANSWER 42
   int life = ANSWER;

``````````

</details>


https://github.com/llvm/llvm-project/pull/156046
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to