]> granicus.if.org Git - clang/commit
Implement the initial part of C++0x [expr.const]p2, which specifies
authorDouglas Gregor <dgregor@apple.com>
Tue, 24 May 2011 16:02:01 +0000 (16:02 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 24 May 2011 16:02:01 +0000 (16:02 +0000)
commit63fe6814f339df30b8463b39995947cbdf920e48
treeb2787522290f73659cb391e785fca5d4526cd0a3
parent5b4e7b11e745329d8a55fd56504450dede1b2100
Implement the initial part of C++0x [expr.const]p2, which specifies
that the unevaluated subexpressions of &&, ||, and ? : are not
considered when determining whether the expression is a constant
expression. Also, turn the "used in its own initializer" warning into
a runtime-behavior warning, so that it doesn't fire when a variable is
used as part of an unevaluated subexpression of its own initializer.

Fixes PR9999.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131968 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
lib/Sema/SemaDecl.cpp
test/CXX/expr/expr.const/p2-0x.cpp [new file with mode: 0644]