clang
3.7.0
|
Constructs a Stack hint for the given symbol. More...
#include <PathDiagnostic.h>
Public Member Functions | |
StackHintGeneratorForSymbol (SymbolRef S, StringRef M) | |
~StackHintGeneratorForSymbol () override | |
std::string | getMessage (const ExplodedNode *N) override |
Search the call expression for the symbol Sym and dispatch the 'getMessageForX()' methods to construct a specific message. More... | |
virtual std::string | getMessageForArg (const Expr *ArgE, unsigned ArgIndex) |
virtual std::string | getMessageForReturn (const CallExpr *CallExpr) |
virtual std::string | getMessageForSymbolNotFound () |
![]() | |
virtual | ~StackHintGenerator ()=0 |
Constructs a Stack hint for the given symbol.
The class knows how to construct the stack hint message based on traversing the CallExpr associated with the call and checking if the given symbol is returned or is one of the arguments. The hint can be customized by redefining 'getMessageForX()' methods.
Definition at line 478 of file PathDiagnostic.h.
|
inline |
Definition at line 484 of file PathDiagnostic.h.
|
inlineoverride |
Definition at line 485 of file PathDiagnostic.h.
|
overridevirtual |
Search the call expression for the symbol Sym and dispatch the 'getMessageForX()' methods to construct a specific message.
Implements clang::ento::StackHintGenerator.
Definition at line 1126 of file PathDiagnostic.cpp.
References clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), clang::ProgramPoint::castAs(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsLocSymbol(), clang::CallExitEnd::getCalleeContext(), clang::StackFrameContext::getCallSite(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), P, and State.
|
virtual |
Produces the message of the following form: 'Msg via Nth parameter'
Definition at line 1173 of file PathDiagnostic.cpp.
|
inlinevirtual |
Definition at line 494 of file PathDiagnostic.h.
|
inlinevirtual |
Definition at line 497 of file PathDiagnostic.h.