]> granicus.if.org Git - clang/commit
constexpr: semantic checking for constexpr variables.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 29 Sep 2011 19:11:37 +0000 (19:11 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 29 Sep 2011 19:11:37 +0000 (19:11 +0000)
commitc6d990a767150b02337de1136fdb55ccf349f4d1
treecb8db222a1cf25c4dde7a9e9f5ded3c92965b4ad
parent97db7265ac1993e14e5877292e23d5ed2e9cf719
constexpr: semantic checking for constexpr variables.

We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140801 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/CXX/class/class.static/class.static.data/p3.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp [new file with mode: 0644]
test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
test/FixIt/fixit-cxx0x.cpp
test/SemaCXX/class.cpp
test/SemaTemplate/instantiate-static-var.cpp