clang  6.0.0svn
Public Member Functions | List of all members
clang::consumed::ConsumedWarningsHandlerBase Class Reference

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

Public Member Functions

virtual ~ConsumedWarningsHandlerBase ()
 
virtual void emitDiagnostics ()
 Emit the warnings and notes left by the analysis. More...
 
virtual void warnLoopStateMismatch (SourceLocation Loc, StringRef VariableName)
 Warn that a variable's state doesn't match at the entry and exit of a loop. More...
 
virtual void warnParamReturnTypestateMismatch (SourceLocation Loc, StringRef VariableName, StringRef ExpectedState, StringRef ObservedState)
 Warn about parameter typestate mismatches upon return. More...
 
virtual void warnParamTypestateMismatch (SourceLocation LOC, StringRef ExpectedState, StringRef ObservedState)
 
virtual void warnReturnTypestateForUnconsumableType (SourceLocation Loc, StringRef TypeName)
 Warn about return typestates set for unconsumable types. More...
 
virtual void warnReturnTypestateMismatch (SourceLocation Loc, StringRef ExpectedState, StringRef ObservedState)
 Warn about return typestate mismatches. More...
 
virtual void warnUseOfTempInInvalidState (StringRef MethodName, StringRef State, SourceLocation Loc)
 Warn about use-while-consumed errors. More...
 
virtual void warnUseInInvalidState (StringRef MethodName, StringRef VariableName, StringRef State, SourceLocation Loc)
 Warn about use-while-consumed errors. More...
 

Detailed Description

Definition at line 43 of file Consumed.h.

Constructor & Destructor Documentation

◆ ~ConsumedWarningsHandlerBase()

ConsumedWarningsHandlerBase::~ConsumedWarningsHandlerBase ( )
virtual

Definition at line 52 of file Consumed.cpp.

Member Function Documentation

◆ emitDiagnostics()

virtual void clang::consumed::ConsumedWarningsHandlerBase::emitDiagnostics ( )
inlinevirtual

Emit the warnings and notes left by the analysis.

Definition at line 50 of file Consumed.h.

◆ warnLoopStateMismatch()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnLoopStateMismatch ( SourceLocation  Loc,
StringRef  VariableName 
)
inlinevirtual

Warn that a variable's state doesn't match at the entry and exit of a loop.

Parameters
Loc– The location of the end of the loop.
VariableName– The name of the variable that has a mismatched state.

Definition at line 59 of file Consumed.h.

Referenced by clang::consumed::ConsumedStateMap::intersectAtLoopHead().

◆ warnParamReturnTypestateMismatch()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnParamReturnTypestateMismatch ( SourceLocation  Loc,
StringRef  VariableName,
StringRef  ExpectedState,
StringRef  ObservedState 
)
inlinevirtual

Warn about parameter typestate mismatches upon return.

Parameters
Loc– The SourceLocation of the return statement.
ExpectedState– The state the return value was expected to be in.
ObservedState– The state the return value was observed to be in.

Definition at line 71 of file Consumed.h.

Referenced by clang::consumed::ConsumedStateMap::checkParamsForReturnTypestate().

◆ warnParamTypestateMismatch()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnParamTypestateMismatch ( SourceLocation  LOC,
StringRef  ExpectedState,
StringRef  ObservedState 
)
inlinevirtual

Definition at line 77 of file Consumed.h.

◆ warnReturnTypestateForUnconsumableType()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnReturnTypestateForUnconsumableType ( SourceLocation  Loc,
StringRef  TypeName 
)
inlinevirtual

Warn about return typestates set for unconsumable types.

Parameters
Loc– The location of the attributes.
TypeName– The name of the unconsumable type.

Definition at line 88 of file Consumed.h.

◆ warnReturnTypestateMismatch()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnReturnTypestateMismatch ( SourceLocation  Loc,
StringRef  ExpectedState,
StringRef  ObservedState 
)
inlinevirtual

Warn about return typestate mismatches.

Parameters
Loc– The SourceLocation of the return statement.
ExpectedState– The state the return value was expected to be in.
ObservedState– The state the return value was observed to be in.

Definition at line 100 of file Consumed.h.

◆ warnUseInInvalidState()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnUseInInvalidState ( StringRef  MethodName,
StringRef  VariableName,
StringRef  State,
SourceLocation  Loc 
)
inlinevirtual

Warn about use-while-consumed errors.

Parameters
MethodName– The name of the method that was incorrectly invoked.
State– The state the object was used in.
VariableName– The name of the variable that holds the unique value.
Loc– The SourceLocation of the method invocation.

Definition at line 125 of file Consumed.h.

◆ warnUseOfTempInInvalidState()

virtual void clang::consumed::ConsumedWarningsHandlerBase::warnUseOfTempInInvalidState ( StringRef  MethodName,
StringRef  State,
SourceLocation  Loc 
)
inlinevirtual

Warn about use-while-consumed errors.

Parameters
MethodName– The name of the method that was incorrectly invoked.
State– The state the object was used in.
Loc– The SourceLocation of the method invocation.

Definition at line 111 of file Consumed.h.


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