diff options
author | Hideto Ueno <uenoku.tokotoko@gmail.com> | 2019-09-11 06:52:11 +0000 |
---|---|---|
committer | Hideto Ueno <uenoku.tokotoko@gmail.com> | 2019-09-11 06:52:11 +0000 |
commit | 37367646578735c1bd453f959dd7696e2a41d621 (patch) | |
tree | b1a24f7c740a5d869574cdcbf6eeeed3a25b94d0 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2aace1ea226eb0517f48890066c7851c8f03e3c8 (diff) | |
download | llvm-37367646578735c1bd453f959dd7696e2a41d621.zip llvm-37367646578735c1bd453f959dd7696e2a41d621.tar.gz llvm-37367646578735c1bd453f959dd7696e2a41d621.tar.bz2 |
[Attributor][Fix] Manifest nocapture only in CSArgument or Argument
Summary:
We can query to Attributor whether the value is captured in the scope or not on the following way:
```
const auto & NoCapAA = A.getAAFor<AANoCapture>(*this, IRPosition::value(V));
```
And if V is CallSiteReturned then `getDeducedAttribute` will add `nocatpure` to the callsite returned value. It is not valid.
This patch checks the position is an argument or call site argument.
This is tested in D67286.
Reviewers: jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67342
llvm-svn: 371589
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions