aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageView.cpp
diff options
context:
space:
mode:
authorValeriy Savchenko <vsavchenko@apple.com>2020-10-21 13:45:28 +0300
committerValeriy Savchenko <vsavchenko@apple.com>2021-01-05 18:26:44 +0300
commitfec1a442e3b12fc01929b2b405d1abf7df9ab68e (patch)
tree67266e961e4422864f38e08aa004ed772530cb56 /llvm/tools/llvm-cov/SourceCoverageView.cpp
parent7e4f53f748d3c97f0b9b852bfbcab0740aba521b (diff)
downloadllvm-fec1a442e3b12fc01929b2b405d1abf7df9ab68e.zip
llvm-fec1a442e3b12fc01929b2b405d1abf7df9ab68e.tar.gz
llvm-fec1a442e3b12fc01929b2b405d1abf7df9ab68e.tar.bz2
[-Wcalled-once-parameter] Introduce 'called_once' attribute
This commit introduces a new attribute `called_once`. It can be applied to function-like parameters to signify that this parameter should be called exactly once. This concept is particularly widespread in asynchronous programs. Additionally, this commit introduce a new group of dataflow analysis-based warnings to check this property. It identifies and reports the following situations: * parameter is called twice * parameter is never called * parameter is not called on one of the paths Current implementation can also automatically infer `called_once` attribute for completion handler paramaters that should follow the same principle by convention. This behavior is OFF by default and can be turned on by using `-Wcompletion-handler`. Differential Revision: https://reviews.llvm.org/D92039 rdar://72812043
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
0 files changed, 0 insertions, 0 deletions