diff options
Diffstat (limited to 'clang/test/SemaCXX/default1.cpp')
-rw-r--r-- | clang/test/SemaCXX/default1.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/default1.cpp b/clang/test/SemaCXX/default1.cpp index 286be6106b1..28444207d86 100644 --- a/clang/test/SemaCXX/default1.cpp +++ b/clang/test/SemaCXX/default1.cpp @@ -26,4 +26,6 @@ struct Y { explicit Y(int); }; -void k(Y y = 17); // expected-error{{incompatible type in default argument}} +void k(Y y = 17); // expected-error{{cannot initialize 'y' with an rvalue of type 'int'}} + +void kk(Y = 17); // expected-error{{cannot initialize a value of type 'struct Y' with an rvalue of type 'int'}} |