]> granicus.if.org Git - clang/commit
The 'constexpr implies const' rule for non-static member functions is gone in
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 21 Apr 2013 01:08:50 +0000 (01:08 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 21 Apr 2013 01:08:50 +0000 (01:08 +0000)
commit840462670ba7a6bc26265a2306b35f2f0f01f51c
tree83c14a10bce99e57a7064e3edb4a50d3c8b300af
parent39b0e269dc8895ecc0f92f08126d3082b2a837a8
The 'constexpr implies const' rule for non-static member functions is gone in
C++1y, so stop adding the 'const' there. Provide a compatibility warning for
code relying on this in C++11, with a fix-it hint. Update our lazily-written
tests to add the const, except for those ones which were testing our
implementation of this rule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Parse/ParseDecl.cpp
lib/Sema/SemaDecl.cpp
test/CXX/basic/basic.types/p10.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp
test/CXX/dcl.dcl/p4-0x.cpp
test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp
test/CXX/expr/expr.ass/p9-cxx11.cpp
test/CXX/expr/expr.const/p2-0x.cpp
test/CXX/expr/expr.const/p3-0x.cpp
test/CXX/expr/expr.const/p5-0x.cpp
test/CXX/stmt.stmt/stmt.select/stmt.switch/p2-0x.cpp
test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp
test/FixIt/fixit-cxx1y-compat.cpp [new file with mode: 0644]
test/Parser/cxx0x-ambig.cpp
test/Parser/cxx0x-decl.cpp
test/SemaCXX/constant-expression-cxx11.cpp
test/SemaCXX/cxx1y-constexpr-not-const.cpp [new file with mode: 0644]
test/SemaCXX/enum-unscoped-nonexistent.cpp