clang 24.0.0git
clang::NonTrivialityReason Struct Reference

Explains why TrivialFunctionAnalysis rejected a statement, so that a diagnostic can blame the code that is actually responsible. More...

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h"

Classes

struct  Frame
 One function in the chain of calls that leads from OffendingStmt to the code that could destruct an object. More...

Public Attributes

const Stmt * OffendingStmt = nullptr
 The innermost non-trivial statement inside the analyzed function's own body.
llvm::SmallVector< Frame > CallStack
 The callees that could not be proven free of destruction, outermost first: the first frame is called from OffendingStmt, each subsequent frame is called from the previous frame's OffendingStmt, and the last frame is where the destruction actually happens or a function without a visible definition.

Detailed Description

Explains why TrivialFunctionAnalysis rejected a statement, so that a diagnostic can blame the code that is actually responsible.

Definition at line 214 of file PtrTypesSemantics.h.

Member Data Documentation

◆ CallStack

llvm::SmallVector<Frame> clang::NonTrivialityReason::CallStack

The callees that could not be proven free of destruction, outermost first: the first frame is called from OffendingStmt, each subsequent frame is called from the previous frame's OffendingStmt, and the last frame is where the destruction actually happens or a function without a visible definition.

Empty when OffendingStmt destructs an object by itself, e.g. a delete expression or a local variable with a non-trivial destructor.

Definition at line 239 of file PtrTypesSemantics.h.

◆ OffendingStmt

const Stmt* clang::NonTrivialityReason::OffendingStmt = nullptr

The innermost non-trivial statement inside the analyzed function's own body.

Without this, a diagnostic would have to blame the whole enclosing statement, which often reads as an accusation against an innocent callee that merely happens to appear first, e.g. the std::min in x = std::min(a, unsafe()).

Definition at line 220 of file PtrTypesSemantics.h.


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