aaron.ballman added inline comments.

================
Comment at: clang/include/clang/Sema/Sema.h:5281
+                                              SourceLocation TemplateKwLoc,
+                                              bool HasTrailingLParen);
+
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > This parameter is always false, so it seems like it can be dropped.
> Not if we extend to `sizeof id` - I guess i can drop it for now?
I'd drop for now -- we can add it in later when we get around to doing the full 
core issue once it's settled.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:700
+
+  if (Tok.is(tok::identifier) && NextToken().is(tok::r_paren)) {
+    SourceLocation TemplateKWLoc;
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > This feels surprisingly restrictive to me, but it's sufficient for getting 
> > libstdc++ working again.
> I've can't think of another kind of unqualified-id that could refer to a 
> capturable entity here.
> Do you know what would be missing?
> Also, without being very restrictive, I'm not sure how this is implementable
What I find restrictive is that it requires an unqualified-id *only* to kick in 
as being maybe mutable agnostic. e.g., `decltype(id)` and `decltype(+id)` 
(where the unary + may be an overloaded operator that depends on the mutability 
of the `this` object).

(I'm not seeing the principle that guides this restriction proposed in the core 
issue yet, but those can be hashed out later.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123909

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to