[PATCH] D97362: [clang][parser] Allow attributes in explicit template instantiations

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 24 06:06:48 PDT 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

I think this basically LGTM with a few minor nits, but I'd like to make sure @rsmith doesn't have concerns, so please wait a few days before landing in case he wants to chime in.



================
Comment at: clang/lib/Parse/ParseDecl.cpp:1618
+    Token FirstLSquare;
+    Lexer::getRawToken(Attrs.Range.getBegin(), FirstLSquare, SM, getLangOpts());
+
----------------
We may as well hoist the call to `getLangOpts()` the same as we do for `getSourceManager()`.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:1626
+        // The attribute range starts with [[, but is empty. So this must
+        // be [[]], which we are supposed to diagnose since
+        // DiagnoseEmptyAttrs is true.
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97362/new/

https://reviews.llvm.org/D97362



More information about the cfe-commits mailing list