vsapsai added a comment.
I had performance considerations regarding this change because
`ConsumeAnyToken` is heavier than `ConsumeToken`. But I didn't notice any
problems. If you know this is a hot path that deserves more attention, please
let me know.
================
Comment at: clang/lib/Parse/ParseDecl.cpp:3076
DS.SetRangeEnd(Tok.getAnnotationEndLoc());
ConsumeAnnotationToken(); // The typename
}
----------------
Here we potentially can leave annotation token unconsumed. But I wasn't able to
create a test case that would trigger a problem at this point.
================
Comment at: clang/lib/Parse/ParseDecl.cpp:3148
DS.SetRangeEnd(Tok.getAnnotationEndLoc());
ConsumeAnnotationToken(); // The typename
----------------
We didn't consume the annotation token because of `break` on `isInvalid` a few
lines above.
https://reviews.llvm.org/D44449
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits