Fix a bogus error overloading an operator where the only class
parameter has a dependent type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74380 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index b7a4299..cf0dab5 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1789,7 +1789,7 @@
AttributeList *AttrList,
bool IsTypeName) {
assert(!SS.isInvalid() && "Invalid CXXScopeSpec.");
- assert(TargetName || Op && "Invalid TargetName.");
+ assert((TargetName || Op) && "Invalid TargetName.");
assert(IdentLoc.isValid() && "Invalid TargetName location.");
assert(S->getFlags() & Scope::DeclScope && "Invalid Scope.");
@@ -2746,7 +2746,8 @@
ParamEnd = FnDecl->param_end();
Param != ParamEnd; ++Param) {
QualType ParamType = (*Param)->getType().getNonReferenceType();
- if (ParamType->isRecordType() || ParamType->isEnumeralType()) {
+ if (ParamType->isDependentType() || ParamType->isRecordType() ||
+ ParamType->isEnumeralType()) {
ClassOrEnumParam = true;
break;
}