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,h --
clang/include/clang/Parse/Parser.h clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaType.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/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index f643f1cb3..fd8c40010 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -1358,8 +1358,8 @@ public:
/// allows Sema to call back into Parser without including Parser.h.
///
/// Processes a single late-parsed type attribute: validates the attribute
- /// kind/type and wraps \p type in a CountAttributedType whose count is not
yet
- /// known, if appropriate. Returns false if the attribute is invalid.
+ /// kind/type and wraps \p type in a CountAttributedType whose count is not
+ /// yet known, if appropriate. Returns false if the attribute is invalid.
typedef bool ProcessLateParsedTypeAttrCB(LateParsedAttribute *LA,
QualType &type,
unsigned pointerNestLevel);
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 0ada18543..20d79d646 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4905,12 +4905,12 @@ bool
Parser::ProcessLateParsedTypeAttrCallback(LateParsedAttribute *LA,
// One attribute yields one type node, even when several declarators share
it.
// A declaration-specifier-position attribute lives on the DeclSpec, whose
- // late-attribute list ConvertDeclSpecToType walks once per declarator, so
this
- // callback runs N times for `IP __counted_by(n) a, b;`. Building a fresh
- // (deliberately un-uniqued) node each time would leave every node but the
last
- // orphaned with a null count, so reuse the node instead. This matches the
- // eager path, where getCountAttributedType uniques on the count expression
and
- // all declarators likewise share one node.
+ // late-attribute list ConvertDeclSpecToType walks once per declarator, so
+ // this callback runs N times for `IP __counted_by(n) a, b;`. Building a
fresh
+ // (deliberately un-uniqued) node each time would leave every node but the
+ // last orphaned with a null count, so reuse the node instead. This matches
+ // the eager path, where getCountAttributedType uniques on the count
+ // expression and all declarators likewise share one node.
if (LTA->TypeToComplete) {
type = QualType(LTA->TypeToComplete, 0);
return true;
``````````
</details>
https://github.com/llvm/llvm-project/pull/224558
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits