]> granicus.if.org Git - clang/commit
[ARC] Ignore qualifiers in copy-restore expressions
authorVedant Kumar <vsk@apple.com>
Mon, 3 Oct 2016 15:29:22 +0000 (15:29 +0000)
committerVedant Kumar <vsk@apple.com>
Mon, 3 Oct 2016 15:29:22 +0000 (15:29 +0000)
commitb3fa84259ca68feb9379c001a30e839ed376145b
tree5e3cc5125f6517d30377e8c36cb5a1e37e032b5c
parent8e9bb60de4f052fff11196bdbc3a0c37f807241a
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283116 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp
test/CodeGenObjC/unqual-copy-restore.m [new file with mode: 0644]