diff options
author | Balazs Benics <balazs.benics@sigmatechnology.se> | 2021-10-18 14:57:24 +0200 |
---|---|---|
committer | Balazs Benics <balazs.benics@sigmatechnology.se> | 2021-10-18 14:57:24 +0200 |
commit | 5644d152578f4604f7dc8c908a0a3f91a726ad80 (patch) | |
tree | ee5dd991c2a27c894398f79821a12487ad511a95 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | cbf778a592fa5ee7c2bdd3d3ee7b468da2a7c9e6 (diff) | |
download | llvm-5644d152578f4604f7dc8c908a0a3f91a726ad80.zip llvm-5644d152578f4604f7dc8c908a0a3f91a726ad80.tar.gz llvm-5644d152578f4604f7dc8c908a0a3f91a726ad80.tar.bz2 |
[analyzer][NFC] Add unittests for CallDescription and split the old ones
This NFC change accomplishes three things:
1) Splits up the single unittest into reasonable segments.
2) Extends the test infra using a template to select the AST-node
from which it is supposed to construct a `CallEvent`.
3) Adds a *lot* of different tests, documenting the current
capabilities of the `CallDescription`. The corresponding tests are
marked with `FIXME`s, where the current behavior should be different.
Both `CXXMemberCallExpr` and `CXXOperatorCallExpr` are derived from
`CallExpr`, so they are matched by using the default template parameter.
On the other hand, `CXXConstructExpr` is not derived from `CallExpr`.
In case we want to match for them, we need to pass the type explicitly
to the `CallDescriptionAction`.
About destructors:
They have no AST-node, but they are generated in the CFG machinery in
the analyzer. Thus, to be able to match against them, we would need to
construct a CFG and walk on that instead of simply walking the AST.
I'm also relaxing the `EXPECT`ation in the
`CallDescriptionConsumer::performTest()`, to check the `LookupResult`
only if we matched for the `CallDescription`.
This is necessary to allow tests in which we expect *no* matches at all.
Reviewed By: martong
Differential Revision: https://reviews.llvm.org/D111794
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions