aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/pointer-assignment.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2020-12-07 14:39:42 -0800
committerLeonard Chan <leonardchan@google.com>2020-12-07 14:39:42 -0800
commit155fca3cae275562e626d3e4fbfac70b4b75d2e7 (patch)
treec8de5b2d62abbc75b1e2bc0860e73cb79acf5a22 /flang/lib/Semantics/pointer-assignment.cpp
parent1d03a54d9460fa122f0be9bf9018b9a4358745a9 (diff)
downloadllvm-155fca3cae275562e626d3e4fbfac70b4b75d2e7.zip
llvm-155fca3cae275562e626d3e4fbfac70b4b75d2e7.tar.gz
llvm-155fca3cae275562e626d3e4fbfac70b4b75d2e7.tar.bz2
[clang] Fix noderef for array member of deref expr
Committing on behalf of thejh (Jann Horn). Given an attribute((noderef)) pointer "p" to the struct struct s { int a[2]; }; ensure that the following expressions are treated the same way by the noderef logic: p->a (*p).a Until now, the first expression would be treated correctly (nothing is added to PossibleDerefs because CheckMemberAccessOfNoDeref() bails out on array members), but the second expression would incorrectly warn because "*p" creates a PossibleDerefs entry. Handle this case the same way as for the AddrOf operator. Differential Revision: https://reviews.llvm.org/D92140
Diffstat (limited to 'flang/lib/Semantics/pointer-assignment.cpp')
0 files changed, 0 insertions, 0 deletions