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

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 10:45:52 PDT 2022


cor3ntin marked an inline comment as done.
cor3ntin 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:
> 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


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