@@ -1323,7 +1323,11 @@ void Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) {
13231323 FD->addAttr (NoBuiltinAttr::CreateImplicit (Context, V.data (), V.size ()));
13241324}
13251325
1326- static bool typeListMatches (ASTContext& Context, FunctionDecl *FD,
1326+ static QualType getCanonicalParamType (ASTContext &C, QualType T) {
1327+ return C.getCanonicalParamType (T);
1328+ }
1329+
1330+ static bool typeListMatches (ASTContext &Context, FunctionDecl *FD,
13271331 const clang::Sema::SymbolLabel &Label) {
13281332 assert (Label.TypeList .has_value ());
13291333 if (FD->getNumParams () != Label.TypeList ->size ()) {
@@ -1334,25 +1338,10 @@ static bool typeListMatches(ASTContext& Context, FunctionDecl *FD,
13341338 for (unsigned i = 0 ; i != FD->getNumParams (); ++i) {
13351339 const ParmVarDecl *PVD = FD->getParamDecl (i);
13361340 QualType ParmType = PVD->getType ().getCanonicalType ();
1337- #if SDP
1338- // SDP QualType ParmType = PVD->getOriginalType().getCanonicalType();
1339- if (ParmType->isArrayType ())
1340- ParmType = Context.getArrayDecayedType (ParmType);
1341- else if (ParmType->isFunctionType ())
1342- ParmType = Context.getPointerType (ParmType);
1343- #endif
1344-
1345- QualType MapArgType = (*Label.TypeList )[i].getCanonicalType ();
1346- #if SDP
1347- if (MapArgType->isArrayType ())
1348- MapArgType = Context.getArrayDecayedType (MapArgType);
1349- else if (MapArgType->isFunctionType ())
1350- MapArgType = Context.getPointerType (MapArgType);
1351- MapArgType.getDesugaredType (Context)->dump ();
1352-
1353- assert (!ParmType->canDecayToPointerType ());
1354- assert (!MapArgType->canDecayToPointerType ());
1355- #endif
1341+
1342+ QualType MapArgType =
1343+ getCanonicalParamType (Context, (*Label.TypeList )[i].getCanonicalType ());
1344+
13561345 if (ParmType != MapArgType)
13571346 return false ;
13581347 }
0 commit comments