[PATCH] D119609: [Clang][Sema] Prohibit expr statement in the default argument
Jun Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 4 06:49:55 PDT 2022
junaire added inline comments.
================
Comment at: clang/test/Sema/err-expr-stmt-in-default-arg.cpp:10
+
+ void fn(int i, int j = ({{}, {}, {,}}), int k = ""); // expected-error {{expression statement not permitted in default argument}} expected-error {{cannot initialize a parameter of type 'int' with an lvalue of type 'const char[1]'}} expected-note {{passing argument to parameter 'k' here}}
+}
----------------
@erichkeane Do you mean this one? Or I get you wrong?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119609/new/
https://reviews.llvm.org/D119609
More information about the cfe-commits
mailing list