[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 5 08:55:19 PST 2021
RKSimon added inline comments.
================
Comment at: clang/lib/Sema/SemaType.cpp:7662
- Expr *sizeExpr;
-
- // Special case where the argument is a template id.
- if (Attr.isArgIdent(0)) {
- CXXScopeSpec SS;
- SourceLocation TemplateKWLoc;
- UnqualifiedId id;
- id.setIdentifier(Attr.getArgAsIdent(0)->Ident, Attr.getLoc());
-
- ExprResult Size = S.ActOnIdExpression(S.getCurScope(), SS, TemplateKWLoc,
- id, /*HasTrailingLParen=*/false,
- /*IsAddressOfOperand=*/false);
- if (Size.isInvalid())
- return;
-
- sizeExpr = Size.get();
- } else {
- sizeExpr = Attr.getArgAsExpr(0);
- }
-
+ Expr *sizeExpr = Attr.getArgAsExpr(0);
// Create the vector type.
----------------
(style) SizeExpr
================
Comment at: clang/lib/Sema/SemaType.cpp:7938
+ Expr *RowsExpr = Attr.getArgAsExpr(0);
// Get the number of columns
+ Expr *ColsExpr = Attr.getArgAsExpr(1);
----------------
these comments seem unnecessary now?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94092/new/
https://reviews.llvm.org/D94092
More information about the cfe-commits
mailing list