[StaticAnalyzer] Support struct annotations in FuchsiaHandleChecker
authorHaowei Wu <haowei@google.com>
Sun, 22 Nov 2020 03:59:51 +0000 (19:59 -0800)
committerHaowei Wu <haowei@google.com>
Sun, 22 Nov 2020 03:59:51 +0000 (19:59 -0800)
commit914f6c4ff8a42d384cad0bbb07de4dd1a96c78d4
tree82e39e1ba61911e8856fd89d36ed5e8c7ad0ea92
parentdef7cfb7ffd40691f903287a060f4405bab56d1a
[StaticAnalyzer] Support struct annotations in FuchsiaHandleChecker

Support adding handle annotations to sturucture that contains
handles. All the handles referenced by the structure (direct
value or ptr) would be treated as containing the
release/use/acquire annotations directly.

Patch by Yu Shan

Differential Revision: https://reviews.llvm.org/D91223
clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp
clang/test/Analysis/fuchsia_handle.cpp