riccibruno added inline comments.
================
Comment at: clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:51
+ extern void h8a(int = sizeof(z)); // ok
+ extern void h8b(int = w); // expected-error {{default argument
references local variable 'w'}}
----------------
rsmith wrote:
> The diagnostic in this case is inconsistent with the non-tuple-like cases. I
> think this diagnostic is better; we should use the original `Decl` when
> producing the diagnostic, not the decomposed variable.
Right, let's just refer to the binding in all cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85613/new/
https://reviews.llvm.org/D85613
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits