aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-04 00:33:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-04 00:33:54 +0000
commit5ba73e1af8ef519161bd40063dc325457e21676a (patch)
treef6d895061d3ab21b383e3e555a94cfa61d770f1c /lib/AST/ExprConstant.cpp
parentc08c88c3cfc57b45ec1a9b4707b1f3df3108a639 (diff)
constexpr:
The recent support for potential constant expressions exposed a bug in the implementation of libstdc++4.6, where numeric_limits<int>::min() is defined as (int)1 << 31, which isn't a constant expression. Disable the 'constexpr function never produces a constant expression' error inside system headers to compensate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index a45aea974c..701e9ccd56 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -575,7 +575,8 @@ CallStackFrame::~CallStackFrame() {
static void describeCall(CallStackFrame *Frame, llvm::raw_ostream &Out) {
unsigned ArgIndex = 0;
bool IsMemberCall = isa<CXXMethodDecl>(Frame->Callee) &&
- !isa<CXXConstructorDecl>(Frame->Callee);
+ !isa<CXXConstructorDecl>(Frame->Callee) &&
+ cast<CXXMethodDecl>(Frame->Callee)->isInstance();
if (!IsMemberCall)
Out << *Frame->Callee << '(';