rsmith added inline comments.

================
Comment at: clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p9.cpp:8
+  // expected-error@-1 {{default argument references parameter 'x'}}
+  void f4(int x, int y = x + 0);
+  // expected-error@-1 {{default argument references parameter 'x'}}
----------------
I'd like to see an example like:
```
void f5(int x, int y = ((void)x, 0));
```
to demonstrate that we're checking for potentially-evaluated mentions, not 
odr-uses, here. (`(void)x` is not an odr-use, but is potentially-evaluated.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81615



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

Reply via email to