[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 22 11:14:02 PST 2024
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 f73bf45d68bd2c17602a909751da4a23138d711a c3de96925ea288fa50e72b597428d3e47c2e4595 -- clang/include/clang/Basic/IdentifierTable.h clang/include/clang/Sema/Sema.h clang/lib/Basic/IdentifierTable.cpp clang/lib/Parse/ParseExpr.cpp clang/lib/Parse/ParseObjc.cpp clang/lib/Sema/SemaDecl.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 7e6f59c2f6..8f9f918bf5 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -1597,7 +1597,8 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
if (TryAnnotateTypeOrScopeToken())
return ExprError();
- if (!Tok.getIdentifierInfo() || !Actions.isSimpleTypeSpecifier(*Tok.getIdentifierInfo()))
+ if (!Tok.getIdentifierInfo() ||
+ !Actions.isSimpleTypeSpecifier(*Tok.getIdentifierInfo()))
// We are trying to parse a simple-type-specifier but might not get such
// a token after error recovery.
return ExprError();
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 58e5bc4a42..5565770610 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -2971,7 +2971,8 @@ bool Parser::ParseObjCXXMessageReceiver(bool &IsExpr, void *&TypeOrExpr) {
tok::annot_cxxscope))
TryAnnotateTypeOrScopeToken();
- if (!Tok.getIdentifierInfo() || !Actions.isSimpleTypeSpecifier(*Tok.getIdentifierInfo())) {
+ if (!Tok.getIdentifierInfo() ||
+ !Actions.isSimpleTypeSpecifier(*Tok.getIdentifierInfo())) {
// objc-receiver:
// expression
// Make sure any typos in the receiver are corrected or diagnosed, so that
``````````
</details>
https://github.com/llvm/llvm-project/pull/79037
More information about the cfe-commits
mailing list