|
clang 22.0.0git
|
#include "clang/Analysis/Analyses/CalledOnceCheck.h"
Public Member Functions | |
| CalledOnceCheckHandler ()=default | |
| virtual | ~CalledOnceCheckHandler ()=default |
| virtual void | handleDoubleCall (const ParmVarDecl *Parameter, const Expr *Call, const Expr *PrevCall, bool IsCompletionHandler, bool Poised) |
| Called when parameter is called twice. | |
| virtual void | handleNeverCalled (const ParmVarDecl *Parameter, bool IsCompletionHandler) |
| Called when parameter is not called at all. | |
| virtual void | handleCapturedNeverCalled (const ParmVarDecl *Parameter, const Decl *Where, bool IsCompletionHandler) |
| Called when captured parameter is not called at all. | |
| virtual void | handleNeverCalled (const ParmVarDecl *Parameter, const Decl *Function, const Stmt *Where, NeverCalledReason Reason, bool IsCalledDirectly, bool IsCompletionHandler) |
| Called when parameter is not called on one of the paths. | |
| virtual void | handleBlockThatIsGuaranteedToBeCalledOnce (const BlockDecl *Block) |
| Called when the block is guaranteed to be called exactly once. | |
| virtual void | handleBlockWithNoGuarantees (const BlockDecl *Block) |
| Called when the block has no guarantees about how many times it can get called. | |
Definition at line 47 of file CalledOnceCheck.h.
|
default |
|
virtualdefault |
|
inlinevirtual |
Called when the block is guaranteed to be called exactly once.
It means that we can be stricter with what we report on that block.
| Block | – block declaration that is known to be called exactly once. |
Definition at line 99 of file CalledOnceCheck.h.
References clang::Block.
|
inlinevirtual |
Called when the block has no guarantees about how many times it can get called.
It means that we should be more lenient with reporting warnings in it.
| Block | – block declaration in question. |
Definition at line 105 of file CalledOnceCheck.h.
References clang::Block.
|
inlinevirtual |
Called when captured parameter is not called at all.
| Parameter | – parameter that should be called once. |
| Where | – declaration that captures Parameter |
| IsCompletionHandler | – true, if parameter is a completion handler. |
Definition at line 73 of file CalledOnceCheck.h.
References clang::Parameter.
|
inlinevirtual |
Called when parameter is called twice.
| Parameter | – parameter that should be called once. |
| Call | – call to report the warning. |
| PrevCall | – previous call. |
| IsCompletionHandler | – true, if parameter is a completion handler. |
| Poised | – true, if the second call is guaranteed to happen after the first call. |
Definition at line 59 of file CalledOnceCheck.h.
References clang::Call, and clang::Parameter.
|
inlinevirtual |
Called when parameter is not called at all.
| Parameter | – parameter that should be called once. |
| IsCompletionHandler | – true, if parameter is a completion handler. |
Definition at line 66 of file CalledOnceCheck.h.
References clang::Parameter.
|
inlinevirtual |
Called when parameter is not called on one of the paths.
Usually we try to find a statement that is the least common ancestor of the path containing the call and not containing the call. This helps us to pinpoint a bad path for the user.
| Parameter | – parameter that should be called once. |
| Function | – function declaration where the problem occurred. |
| Where | – the least common ancestor statement. |
| Reason | – a reason describing the path without a call. |
| IsCalledDirectly | – true, if parameter actually gets called on the other path. It is opposed to be used in some other way (added to some collection, passed as a parameter, etc.). |
| IsCompletionHandler | – true, if parameter is a completion handler. |
Definition at line 89 of file CalledOnceCheck.h.
References clang::Function, and clang::Parameter.