Skip to content

Commit ad13fc0

Browse files
committed
Use hasSameType instead of comparing the canonical forms
1 parent 2b6ab4e commit ad13fc0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3457,8 +3457,7 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
34573457
FuncParams.push_back(P->getType().getUnqualifiedType());
34583458
if (std::equal(FuncParams.begin(), FuncParams.end(), Params.begin(),
34593459
Params.end(), [&](QualType LT, QualType RT) {
3460-
return Context.getCanonicalType(LT) ==
3461-
Context.getCanonicalType(RT);
3460+
return Context.hasSameType(LT, RT);
34623461
})) {
34633462
// Make the function visible to name lookup, even if we found it in
34643463
// an unimported module. It either is an implicitly-declared global

0 commit comments

Comments
 (0)