diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-07-23 05:16:10 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-07-23 05:16:10 +0000 |
commit | 9386c82d56745579e86ddbe3a37bea6604658c6a (patch) | |
tree | 894b6be722ed322ff5aef62d6afc279d735afe4b /clang/test/SemaCXX/constant-expression-cxx11.cpp | |
parent | bb3d7b5e81c92b44f6c2db8ba6a0533cb558458c (diff) | |
download | bcm5719-llvm-9386c82d56745579e86ddbe3a37bea6604658c6a.tar.gz bcm5719-llvm-9386c82d56745579e86ddbe3a37bea6604658c6a.zip |
Improve diagnostic on default-initializing const variables (PR20208).
This tweaks the diagnostic wording slighly, and adds a fixit on a note.
An alternative would be to add the fixit directly on the diagnostic, see
the review thread linked to from the bug for a few notes on that approach.
llvm-svn: 213725
Diffstat (limited to 'clang/test/SemaCXX/constant-expression-cxx11.cpp')
-rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index 09d93fa73af..86c2c110f43 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -1177,7 +1177,7 @@ namespace ExternConstexpr { void f() { extern constexpr int i; // expected-error {{constexpr variable declaration must be a definition}} constexpr int j = 0; - constexpr int k; // expected-error {{default initialization of an object of const type}} + constexpr int k; // expected-error {{default initialization of an object of const type}} expected-note{{add an explicit initializer to initialize 'k'}} } } |