aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorShafik Yaghmour <shafik.yaghmour@intel.com>2023-01-30 13:26:02 -0800
committerShafik Yaghmour <shafik.yaghmour@intel.com>2023-01-30 13:28:29 -0800
commit2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5 (patch)
tree1581d2c653cb9b0949fe9bbde808917582f1f9bd /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent950487bddf1922c87559339a24cf5a77ad59c363 (diff)
downloadllvm-2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5.zip
llvm-2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5.tar.gz
llvm-2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5.tar.bz2
[Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type
In TransformAttributedType(...) when checking if _Nullable can be applied to a type it dereferences TL.getAttr() unconditionally which we can see from the code earlier in the function is not correct since it is expected to be nullptr in some cases. It looks like the correct course of action is to use TL.getModifiedLoc() over TL.getAttr()->getLocation() in the case that TL.getAttr() returns a nullptr. Fixes: https://github.com/llvm/llvm-project/issues/60344 Differential Revision: https://reviews.llvm.org/D142799
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions