diff options
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index e9061b8ac2a..d0f214fbd83 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -873,8 +873,7 @@ static bool IsReturnCopyElidable(ASTContext &Ctx, QualType RetType, if (!RetType->isRecordType()) return false; // ... the same cv-unqualified type as the function return type ... - if (Ctx.getCanonicalType(RetType).getUnqualifiedType() != - Ctx.getCanonicalType(ExprType).getUnqualifiedType()) + if (!Ctx.hasSameUnqualifiedType(RetType, ExprType)) return false; // ... the expression is the name of a non-volatile automatic object ... // We ignore parentheses here. |