class ConsumedWarningsHandlerBase

Declaration

class ConsumedWarningsHandlerBase { /* full declaration omitted */ };

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:56

Method Overview

Methods

virtual void emitDiagnostics()

Description

Emit the warnings and notes left by the analysis.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:61

virtual void warnLoopStateMismatch(
    clang::SourceLocation Loc,
    llvm::StringRef VariableName)

Description

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

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:70

Parameters

clang::SourceLocation Loc
-- The location of the end of the loop.
llvm::StringRef VariableName
-- The name of the variable that has a mismatched state.

virtual void warnParamReturnTypestateMismatch(
    clang::SourceLocation Loc,
    llvm::StringRef VariableName,
    llvm::StringRef ExpectedState,
    llvm::StringRef ObservedState)

Description

Warn about parameter typestate mismatches upon return.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:82

Parameters

clang::SourceLocation Loc
-- The SourceLocation of the return statement.
llvm::StringRef VariableName
llvm::StringRef ExpectedState
-- The state the return value was expected to be in.
llvm::StringRef ObservedState
-- The state the return value was observed to be in.

virtual void warnParamTypestateMismatch(
    clang::SourceLocation LOC,
    llvm::StringRef ExpectedState,
    llvm::StringRef ObservedState)

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:88

Parameters

clang::SourceLocation LOC
llvm::StringRef ExpectedState
llvm::StringRef ObservedState

virtual void
warnReturnTypestateForUnconsumableType(
    clang::SourceLocation Loc,
    llvm::StringRef TypeName)

Description

Warn about return typestates set for unconsumable types.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:99

Parameters

clang::SourceLocation Loc
-- The location of the attributes.
llvm::StringRef TypeName
-- The name of the unconsumable type.

virtual void warnReturnTypestateMismatch(
    clang::SourceLocation Loc,
    llvm::StringRef ExpectedState,
    llvm::StringRef ObservedState)

Description

Warn about return typestate mismatches.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:111

Parameters

clang::SourceLocation Loc
-- The SourceLocation of the return statement.
llvm::StringRef ExpectedState
-- The state the return value was expected to be in.
llvm::StringRef ObservedState
-- The state the return value was observed to be in.

virtual void warnUseInInvalidState(
    llvm::StringRef MethodName,
    llvm::StringRef VariableName,
    llvm::StringRef State,
    clang::SourceLocation Loc)

Description

Warn about use-while-consumed errors.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:136

Parameters

llvm::StringRef MethodName
-- The name of the method that was incorrectly invoked.
llvm::StringRef VariableName
-- The name of the variable that holds the unique value.
llvm::StringRef State
-- The state the object was used in.
clang::SourceLocation Loc
-- The SourceLocation of the method invocation.

virtual void warnUseOfTempInInvalidState(
    llvm::StringRef MethodName,
    llvm::StringRef State,
    clang::SourceLocation Loc)

Description

Warn about use-while-consumed errors.

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:122

Parameters

llvm::StringRef MethodName
-- The name of the method that was incorrectly invoked.
llvm::StringRef State
-- The state the object was used in.
clang::SourceLocation Loc
-- The SourceLocation of the method invocation.

virtual ~ConsumedWarningsHandlerBase()

Declared at: clang/include/clang/Analysis/Analyses/Consumed.h:58