diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-14 08:00:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-14 08:00:39 +0000 |
commit | 714fcc1bcb42508983f9fd3435aa1dcd06212a8c (patch) | |
tree | c3fe9d39584261281093f0402cf6a6fe39592cd8 /lib/Sema | |
parent | f7a052732c2b6c82f74708038f75fa92c9b4dba0 (diff) |
Fix regression in r172376. Don't try to detect missing 'constexpr' specifiers
on redeclarations, since that makes us pick wrong prior declarations under
some circumstances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index cc9f4df447..d3d027b8a5 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1038,8 +1038,7 @@ bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old, // or non-static member function). Add it now, on the assumption that this // is a redeclaration of OldMethod. unsigned NewQuals = NewMethod->getTypeQualifiers(); - if ((OldMethod->isConstexpr() || NewMethod->isConstexpr()) && - !isa<CXXConstructorDecl>(NewMethod)) + if (NewMethod->isConstexpr() && !isa<CXXConstructorDecl>(NewMethod)) NewQuals |= Qualifiers::Const; if (OldMethod->getTypeQualifiers() != NewQuals) return true; |