[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 10:48:13 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1486
+  if (Tok.isOneOf(tok::kw_mutable, tok::arrow, tok::kw___attribute,
+                  tok::kw___declspec, tok::kw_constexpr, tok::kw_consteval,
+                  tok::kw___private, tok::kw___global, tok::kw___local,
----------------
cor3ntin wrote:
> cor3ntin wrote:
> > aaron.ballman wrote:
> > > Do we have test coverage for this change? (It seems orthogonal to your patch, so this might be worth splitting out.)
> > I'm happy doing that, or to add a test somewhere.
> This was actually a _very_ stupid change on my part, the previous code was correct. ie, msvc does not support `[] __declspec(deprecated) {};` 
> https://godbolt.org/z/cEKP44rY1
> and so the omission of `__declspec` here, which i thought was a bug, is actually very purposeful
Thank you for double-checking that; I thought that might be the case, but I hadn't tested it myself yet.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119136



More information about the cfe-commits mailing list