[clang] [Clang] FunctionEffects: Correctly navigate through array types in FunctionEffectsRef::get(). (PR #121525)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 11:10:34 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 3cac26f5419b68d37e1919001e1c46a765df294f f16a0128dded93c3e283f285f7ac1c50b4f2ce0e --extensions cpp,h -- clang/include/clang/AST/Type.h clang/test/Sema/attr-nonblocking-constraints.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index e1e960e670..d5162132dc 100644
--- a/clang/include/clang/AST/Type.h
+++ b/clang/include/clang/AST/Type.h
@@ -8844,8 +8844,8 @@ inline FunctionEffectsRef FunctionEffectsRef::get(QualType QT) {
TypePtr = TypePtr->getBaseElementTypeUnsafe();
else
break;
- }
- TypePtr = Pointee.getTypePtr();
+ }
+ TypePtr = Pointee.getTypePtr();
}
if (const auto *FPT = TypePtr->getAs<FunctionProtoType>())
return FPT->getFunctionEffects();
``````````
</details>
https://github.com/llvm/llvm-project/pull/121525
More information about the cfe-commits
mailing list