[PATCH] D137251: [clang][cuda/hip] Allow `__noinline__` lambdas
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 2 10:31:59 PDT 2022
tra added a comment.
LGTM in principle. Please wait for @rsmith's OK.
================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1297-1308
+ while (true) {
+ if (Tok.is(tok::kw___attribute)) {
+ ParseGNUAttributes(Attr, nullptr, &D);
+ } else if (Tok.is(tok::kw___noinline__)) {
+ IdentifierInfo *AttrName = Tok.getIdentifierInfo();
+ SourceLocation AttrNameLoc = ConsumeToken();
+ Attr.addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, nullptr, 0,
----------------
Nit. I'd rearrange it a bit.
```
while (true) {
if (Tok.is(tok::kw___noinline__)) {
IdentifierInfo *AttrName = Tok.getIdentifierInfo();
SourceLocation AttrNameLoc = ConsumeToken();
Attr.addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, nullptr, 0,
ParsedAttr::AS_Keyword);
} else if (Tok.is(tok::kw___attribute))
ParseGNUAttributes(Attr, nullptr, &D);
else
break;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137251/new/
https://reviews.llvm.org/D137251
More information about the cfe-commits
mailing list