diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 23:18:34 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-09-29 23:18:34 +0000 |
commit | 256336d9ab6dc277df8c49704e9900146cea7f69 (patch) | |
tree | a759775273ec4c903d8157bbe29d5ba1f5c070be /clang/test/SemaCXX/class.cpp | |
parent | 82d4a2b91f3fe7ae5937e361aba1df1b882c3de2 (diff) | |
download | bcm5719-llvm-256336d9ab6dc277df8c49704e9900146cea7f69.tar.gz bcm5719-llvm-256336d9ab6dc277df8c49704e9900146cea7f69.zip |
Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode.
llvm-svn: 140820
Diffstat (limited to 'clang/test/SemaCXX/class.cpp')
-rw-r--r-- | clang/test/SemaCXX/class.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp index 725e93f40c6..8d1257895fb 100644 --- a/clang/test/SemaCXX/class.cpp +++ b/clang/test/SemaCXX/class.cpp @@ -173,8 +173,8 @@ namespace rdar8367341 { float foo(); struct A { - static const float x = 5.0f; // expected-warning {{in-class initializer for static data member of type 'const float' not allowed}} - static const float y = foo(); // expected-warning {{in-class initializer for static data member of type 'const float' not allowed}} expected-error {{in-class initializer is not a constant expression}} + static const float x = 5.0f; // expected-warning {{in-class initializer for static data member of type 'const float' is a GNU extension}} + static const float y = foo(); // expected-warning {{in-class initializer for static data member of type 'const float' is a GNU extension}} expected-error {{in-class initializer is not a constant expression}} }; } |