Partially roll back r166898; it exposed a bug in the standard.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 29 Oct 2012 18:26:47 +0000 (18:26 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 29 Oct 2012 18:26:47 +0000 (18:26 +0000)
commitbf83009c7faafe321dd09f15b2ce8f8847d2ded0
tree387c6d8687172568ca342d6d11f985624b02e52a
parent908c936fa9239da91962503527dd701ebe71a9b4
Partially roll back r166898; it exposed a bug in the standard.

The problem is as follows: C++11 has contexts which are not
potentially-evaluated, and yet in which we are required or encouraged to
perform constant evaluation. In such contexts, we are not permitted to
implicitly define special member functions for literal types, therefore
we cannot evalaute those constant expressions.

Punt on this in one more context for now by skipping checking constexpr
variable initializers if they occur in dependent contexts.

llvm-svn: 166956
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCXX/constant-expression-cxx11.cpp