[clang] [Clang] FunctionEffect analysis was missing a CXXBindTemporaryExpr's implicit call to a destructor. (PR #166110)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 2 15:59:01 PST 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 -- clang/lib/Sema/SemaFunctionEffects.cpp clang/test/Sema/attr-nonblocking-constraints.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/Sema/SemaFunctionEffects.cpp b/clang/lib/Sema/SemaFunctionEffects.cpp
index 468f157f2..d68158f84 100644
--- a/clang/lib/Sema/SemaFunctionEffects.cpp
+++ b/clang/lib/Sema/SemaFunctionEffects.cpp
@@ -1275,7 +1275,7 @@ private:
}
bool VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *BTE) override {
- const CXXDestructorDecl* Dtor = BTE->getTemporary()->getDestructor();
+ const CXXDestructorDecl *Dtor = BTE->getTemporary()->getDestructor();
if (Dtor != nullptr) {
CallableInfo CI(*Dtor);
followCall(CI, BTE->getBeginLoc());
``````````
</details>
https://github.com/llvm/llvm-project/pull/166110
More information about the cfe-commits
mailing list