]> granicus.if.org Git - clang/commit
constexpr: semantic checking for constexpr functions and constructors. Based in
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 1 Oct 2011 02:31:28 +0000 (02:31 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 1 Oct 2011 02:31:28 +0000 (02:31 +0000)
commit9f569cca2a4c5fb6026005434e27025b9e71309d
tree4623644f5d65a1ca5526ea45bb24069efa896bfa
parent00ca8483cf8e86a5ea08310c6727fd7848980043
constexpr: semantic checking for constexpr functions and constructors. Based in
part on patches by Peter Collingbourne.

We diverge from the C++11 standard in a few areas, mostly related to checking
constexpr function declarations, and not just definitions. See WG21 paper
N3308=11-0078 for details.

Function invocation substitution is not available in this patch; constexpr
functions cannot yet be used from within constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/clang/AST/DeclCXX.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/AST/Type.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Sema/SemaType.cpp
test/CXX/basic/basic.types/p10.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp [new file with mode: 0644]