[PATCH] D139400: [clang] Show error when a local variables is passed as default template parameter
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 8 12:48:00 PST 2022
shafik added inline comments.
================
Comment at: clang/test/SemaTemplate/default-template-arguments.cpp:9
+
+ auto lambda1 = [] <auto y = x> {}; // expected-error {{default argument references local variable x of enclosing function}}
+ auto lambda2 = [] <auto y = 42> {};
----------------
To clarify my comment about, I think w/ the ODR use checking this should pass.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139400/new/
https://reviews.llvm.org/D139400
More information about the cfe-commits
mailing list