From 30914f3d1cc9f0c24248b9da0f11eec4fb56131f Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Mon, 3 Oct 2016 15:29:22 +0000 Subject: [ARC] Ignore qualifiers in copy-restore expressions When ARC is enabled, an ObjCIndirectCopyRestoreExpr models the passing of a function argument s.t: * The argument is copied into a temporary, * The temporary is passed into the function, and * After the function call completes, the temporary is move-assigned back to the original location of the argument. The argument type and the parameter type must agree "except possibly in qualification". This commit weakens an assertion in EmitCallArg() to actually reflect that. llvm-svn: 283116 --- clang/lib/CodeGen/CGCall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 233f6c17d48..2c40854bbb6 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -3269,7 +3269,7 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E, if (const ObjCIndirectCopyRestoreExpr *CRE = dyn_cast(E)) { assert(getLangOpts().ObjCAutoRefCount); - assert(getContext().hasSameType(E->getType(), type)); + assert(getContext().hasSameUnqualifiedType(E->getType(), type)); return emitWritebackArg(*this, args, CRE); } -- cgit v1.2.3