summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx98-compat.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-12 01:50:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-12 01:50:05 +0000
commit420fa12dfddc33b0d0b54666340bfa630b61b5bc (patch)
treee56b01c02b267ed63d582e87da5da4e9e77f654e /clang/test/SemaCXX/cxx98-compat.cpp
parent7a0516ea668b3ee511b3e5a4f16438189d1a78ae (diff)
downloadbcm5719-llvm-420fa12dfddc33b0d0b54666340bfa630b61b5bc.tar.gz
bcm5719-llvm-420fa12dfddc33b0d0b54666340bfa630b61b5bc.zip
Improve the "braces around scalar init" warning to determine whether to warn
based on whether "redundant" braces are ever reasonable as part of the initialization of the entity, rather than whether the initialization is "top-level". In passing, add a warning flag for it. llvm-svn: 228896
Diffstat (limited to 'clang/test/SemaCXX/cxx98-compat.cpp')
-rw-r--r--clang/test/SemaCXX/cxx98-compat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp
index 029e9098962..4227272d14e 100644
--- a/clang/test/SemaCXX/cxx98-compat.cpp
+++ b/clang/test/SemaCXX/cxx98-compat.cpp
@@ -74,10 +74,10 @@ int InitList(int i = {}) { // expected-warning {{generalized initializer lists a
InitListCtor ilc = { true, false }; // expected-warning {{initialization of initializer_list object is incompatible with C++98}}
const int &r = { 0 }; // expected-warning {{reference initialized from initializer list is incompatible with C++98}}
struct { int a; const int &r; } rr = { 0, {0} }; // expected-warning {{reference initialized from initializer list is incompatible with C++98}}
- return { 0 }; // expected-warning {{generalized initializer lists are incompatible with C++98}}
+ return { 0 }; // expected-warning {{generalized initializer lists are incompatible with C++98}} expected-warning {{scalar}}
}
struct DelayedDefaultArgumentParseInitList {
- void f(int i = {1}) { // expected-warning {{generalized initializer lists are incompatible with C++98}}
+ void f(int i = {1}) { // expected-warning {{generalized initializer lists are incompatible with C++98}} expected-warning {{scalar}}
}
};
OpenPOWER on IntegriCloud