diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-03-18 22:25:45 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-03-18 22:25:45 +0000 |
commit | 3e280b58db5e7dc2bab736fa65af2b8157916726 (patch) | |
tree | 9e0251462c87358fba47a5107a60424ee3fcb710 /test/SemaCXX/cxx98-compat.cpp | |
parent | 359487b68633a65c3e87a2146e0706fa5ae27d19 (diff) |
Add the missing compatibility warning for braced initializers as default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx98-compat.cpp')
-rw-r--r-- | test/SemaCXX/cxx98-compat.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/cxx98-compat.cpp b/test/SemaCXX/cxx98-compat.cpp index 903932c189..211f11cc59 100644 --- a/test/SemaCXX/cxx98-compat.cpp +++ b/test/SemaCXX/cxx98-compat.cpp @@ -39,7 +39,8 @@ void Lambda() { []{}(); // expected-warning {{lambda expressions are incompatible with C++98}} } -int InitList() { +int InitList(int i = {}) { // expected-warning {{generalized initializer lists are incompatible with C++98}} \ + // expected-warning {{scalar initialized from empty initializer list is incompatible with C++98}} (void)new int {}; // expected-warning {{generalized initializer lists are incompatible with C++98}} \ // expected-warning {{scalar initialized from empty initializer list is incompatible with C++98}} (void)int{}; // expected-warning {{generalized initializer lists are incompatible with C++98}} \ |