14#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_CALLEDONCECHECK_H
15#define LLVM_CLANG_ANALYSIS_ANALYSES_CALLEDONCECHECK_H
60 const Expr *PrevCall,
bool IsCompletionHandler,
67 bool IsCompletionHandler) {}
75 bool IsCompletionHandler) {}
92 bool IsCalledDirectly,
93 bool IsCompletionHandler) {}
121 CalledOnceCheckHandler &Handler,
122 bool CheckConventionalParameters);
AnalysisDeclContext contains the context data for the function, method or block under analysis.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt.
virtual void handleBlockThatIsGuaranteedToBeCalledOnce(const BlockDecl *Block)
Called when the block is guaranteed to be called exactly once.
CalledOnceCheckHandler()=default
virtual ~CalledOnceCheckHandler()=default
virtual void handleBlockWithNoGuarantees(const BlockDecl *Block)
Called when the block has no guarantees about how many times it can get called.
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.
Decl - This represents one declaration (or definition), e.g.
This represents one expression.
Represents a parameter to a function.
Stmt - This represents one statement.
The JSON file list parser is used to communicate input to InstallAPI.
@ Parameter
The parameter type of a method or function.
void checkCalledOnceParameters(AnalysisDeclContext &AC, CalledOnceCheckHandler &Handler, bool CheckConventionalParameters)
Check given CFG for 'called once' parameter violations.