diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-22 06:49:09 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-22 06:49:09 +0000 |
| commit | 2a15b7460577b5f22b187a8ab9208da5360b983a (patch) | |
| tree | 7cd56af34932bfb135e3fffa0a81327bd66284ab /clang/test/CXX | |
| parent | db42c6faa48462ffbbae3b001bf364954042c65b (diff) | |
| download | bcm5719-llvm-2a15b7460577b5f22b187a8ab9208da5360b983a.tar.gz bcm5719-llvm-2a15b7460577b5f22b187a8ab9208da5360b983a.zip | |
Accept braced-init-lists in conditions, and, in passing, dramatically improve
the diagnostic for using a parenthesized direct-initializer in a condition.
llvm-svn: 151137
Diffstat (limited to 'clang/test/CXX')
| -rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp index 0219185a9fb..1daf02f6ea5 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp @@ -13,9 +13,9 @@ void g() { auto *b; // expected-error{{declaration of variable 'b' with type 'auto *' requires an initializer}} - if (auto b) {} // expected-error {{expected '='}} - for (;auto b;) {} // expected-error {{expected '='}} - while (auto b) {} // expected-error {{expected '='}} + if (auto b) {} // expected-error {{must have an initializer}} + for (;auto b;) {} // expected-error {{must have an initializer}} + while (auto b) {} // expected-error {{must have an initializer}} if (auto b = true) { (void)b; } } |

