A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classclang_1_1CalledOnceCheckHandler.html below:

clang: clang::CalledOnceCheckHandler Class Reference

#include "clang/Analysis/Analyses/CalledOnceCheck.h"

  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.

◆ CalledOnceCheckHandler() clang::CalledOnceCheckHandler::CalledOnceCheckHandler ( ) default ◆ ~CalledOnceCheckHandler() virtual clang::CalledOnceCheckHandler::~CalledOnceCheckHandler ( ) virtualdefault ◆ handleBlockThatIsGuaranteedToBeCalledOnce() virtual void clang::CalledOnceCheckHandler::handleBlockThatIsGuaranteedToBeCalledOnce ( const BlockDeclBlock ) 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.

Parameters
Block – block declaration that is known to be called exactly once.

Definition at line 99 of file CalledOnceCheck.h.

◆ handleBlockWithNoGuarantees() virtual void clang::CalledOnceCheckHandler::handleBlockWithNoGuarantees ( const BlockDeclBlock ) 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.

Parameters
Block – block declaration in question.

Definition at line 105 of file CalledOnceCheck.h.

◆ handleCapturedNeverCalled() virtual void clang::CalledOnceCheckHandler::handleCapturedNeverCalled ( const ParmVarDeclParameter, const DeclWhere, bool  IsCompletionHandler  ) inlinevirtual

Called when captured parameter is not called at all.

Parameters
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.

◆ handleDoubleCall() virtual void clang::CalledOnceCheckHandler::handleDoubleCall ( const ParmVarDeclParameter, const ExprCall, const ExprPrevCall, bool  IsCompletionHandler, bool  Poised  ) inlinevirtual

Called when parameter is called twice.

Parameters
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.

◆ handleNeverCalled() [1/2] virtual void clang::CalledOnceCheckHandler::handleNeverCalled ( const ParmVarDeclParameter, bool  IsCompletionHandler  ) inlinevirtual

Called when parameter is not called at all.

Parameters
Parameter – parameter that should be called once. IsCompletionHandler – true, if parameter is a completion handler.

Definition at line 66 of file CalledOnceCheck.h.

◆ handleNeverCalled() [2/2]

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.

Parameters
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.

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4