]> granicus.if.org Git - clang/commit
[analysis] Introduce an AnyCall helper class, for abstraction over different callables
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 25 Jan 2019 01:23:51 +0000 (01:23 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 25 Jan 2019 01:23:51 +0000 (01:23 +0000)
commitad1e9725fdfc612d71448cb41672b7892a85e1dd
treeffa045f78677d9566e15160f59b7af6e977a40e0
parent6b6d467fc080468077e4ae623138118c9d365cc1
[analysis] Introduce an AnyCall helper class, for abstraction over different callables

A lot of code, particularly in the analyzer, has to perform a lot of
duplication to handle functions/ObjCMessages/destructors/constructors in
a generic setting.
The analyzer already has a CallEvent helper class abstracting over such
calls, but it's not always suitable, since it's tightly coupled to other
analyzer classes (ExplodedNode, ProgramState, etc.) and it's not always
possible to construct.

This change introduces a very simple, very lightweight helper class to
do simple generic operations over callables.

In future, parts of CallEvent could be changed to use this class to
avoid some duplication.

Differential Revision: https://reviews.llvm.org/D57126

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352148 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/AnyCall.h [new file with mode: 0644]