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
// 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;
struct S {
constexpr int f();
constexpr int g() const;
+ constexpr int h();
+ int h();
static constexpr int Sf();
/*static*/ constexpr void *operator new(size_t) noexcept;
template<typename T> constexpr T tm();
constexpr int S::f() const { return 0; }
constexpr int S::g() { return 1; }
+constexpr int S::h() { return 0; }
+int S::h() { return 0; }
constexpr int S::Sf() { return 2; }
constexpr void *S::operator new(size_t) noexcept { return 0; }
template<typename T> constexpr T S::tm() { return T(); }