aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorziqingluo-90 <ziqing@udel.edu>2023-07-19 15:00:10 -0700
committerziqingluo-90 <ziqing@udel.edu>2023-07-19 15:04:42 -0700
commita6302b6934b349fff122eeb6c4b39eff580c4b1b (patch)
tree8e2540d359ecc3d09ad9866a735799155dc95abc /clang/lib/CodeGen/CodeGenFunction.cpp
parentdc37d5ec800b2d32baa0432304382b812b89cd0d (diff)
downloadllvm-a6302b6934b349fff122eeb6c4b39eff580c4b1b.zip
llvm-a6302b6934b349fff122eeb6c4b39eff580c4b1b.tar.gz
llvm-a6302b6934b349fff122eeb6c4b39eff580c4b1b.tar.bz2
[-Wunsafe-buffer-usage] Check source location validity before using `TypeLoc`s
The safe-buffer analysis analyzes TypeLocs of types of variable declarations in order to get source locations of them. However, in some cases, the source locations of a TypeLoc are not valid. Using invalid source locations results in assertion violation or incorrect analysis or fix-its. It is still not clear to me in what circumstances a TypeLoc does not have valid source locations (it looks like a bug in Clang to me, but it is not our responsibility to fix it). So we will conservatively give up the analysis when required source locations are not valid. Reviewed By: NoQ (Artem Dergachev) Differential Revision: https://reviews.llvm.org/D155667
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions