[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 19 10:01:54 PDT 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 3f62718c4a907125af31faa62365bdf11ddef7b6 9bc13aee5775af148941826b74e5c9fbaab907c7 --extensions cpp -- clang/lib/AST/ASTContext.cpp clang/test/SemaCXX/sugar-common-types.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 28f4332162..5429cdc704 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -14171,7 +14171,7 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X,
/// Returns element type of the array, probably multidimensional, specified by
/// the given ArrayType.
/// \returns Canonical type of the array element.
-static QualType getNonArrayElementType(const ArrayType* ATy) {
+static QualType getNonArrayElementType(const ArrayType *ATy) {
QualType ElTy = ATy->getElementType().getCanonicalType();
while (auto *SubArr = dyn_cast<ArrayType>(ElTy.getTypePtr()))
ElTy = SubArr->getElementType();
``````````
</details>
https://github.com/llvm/llvm-project/pull/131649
More information about the cfe-commits
mailing list