================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+int p(int x, int = sizeof(x));
+int q(int x, int = sizeof([] { return x; }()));
+int r(int x, int = decltype([] { return x; }())());
+int s(int x, bool = noexcept([] { return x; }()));
----------------
usefahmed07 wrote:Thanks, you were right. The root cause was an early return in tryCaptureVariable for parameters not yet tied to their function. It now diagnoses the use, including in unevaluated operands. I updated the PR and the tests. https://github.com/llvm/llvm-project/pull/235057 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
