[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 23 04:00:02 PST 2023


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 c43c88501e3bc273a7c1074a19e86dc305ad7234 c8f8e6d0a88b9fd1d905ca0a09ffe6e0415ab90e -- clang/test/CXX/drs/dr27xx.cpp clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/static-assert-cxx26.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 01e2be3a45..1d9e4a0ac4 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -17297,7 +17297,7 @@ bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message,
     Empty = MemberLookup.empty();
     OverloadCandidateSet Candidates(MemberLookup.getNameLoc(),
                                     OverloadCandidateSet::CSK_Normal);
-    if(MemberLookup.empty())
+    if (MemberLookup.empty())
       return std::nullopt;
     return MemberLookup;
   };

``````````

</details>


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


More information about the cfe-commits mailing list