[Fix][-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callabl...
authorziqingluo-90 <ziqing@udel.edu>
Fri, 6 Jan 2023 20:30:11 +0000 (12:30 -0800)
committerziqingluo-90 <ziqing@udel.edu>
Fri, 6 Jan 2023 20:32:35 +0000 (12:32 -0800)
commit6d140b952805bd9277fba666520ce46c19f2c637
tree888610ffde35bffc22a62c492b17083cebc396b8
parente502f4fc2e25eedaca6bd8c1eacc6e0365ef403a
[Fix][-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations

The original patch does include a `new` statement without a matching
`delete`, causing Sanitizer warnings in
https://lab.llvm.org/buildbot/#/builders/5/builds/30522/steps/13/logs/stdio.

This commit is a fix to it.

Differential Revision: https://reviews.llvm.org/D138329
clang/lib/Analysis/UnsafeBufferUsage.cpp