|
clang 24.0.0git
|
The class detects jumps which bypass local variables declaration: goto L; int a; L: More...
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/VarBypassDetector.h"
Public Member Functions | |
| void | Init (CodeGenModule &CGM, const Stmt *Body) |
| Clear the object and pre-process for the given statement, usually function body statement. | |
| bool | IsBypassed (const VarDecl *D) const |
| Returns true if the variable declaration was by bypassed by any goto or switch statement. | |
| bool | isAlwaysBypassed () const |
| Returns true if jump sources cannot be determined (e.g. | |
| const llvm::SmallSetVector< const VarDecl *, 4 > * | getBypassedVarsForSource (const Stmt *Source) const |
| Returns the variables bypassed by jumps from the given source statement, or nullptr if it bypasses none. | |
The class detects jumps which bypass local variables declaration: goto L; int a; L:
This is simplified version of JumpScopeChecker. Primary differences:
Definition at line 41 of file VarBypassDetector.h.
|
inline |
Returns the variables bypassed by jumps from the given source statement, or nullptr if it bypasses none.
Definition at line 74 of file VarBypassDetector.h.
| void VarBypassDetector::Init | ( | CodeGenModule & | CGM, |
| const Stmt * | Body ) |
Clear the object and pre-process for the given statement, usually function body statement.
Definition at line 45 of file VarBypassDetector.cpp.
References clang::Detect, and hasJumpStmts().
|
inline |
Returns true if jump sources cannot be determined (e.g.
computed gotos), so all variables must be treated as bypassed.
Definition at line 69 of file VarBypassDetector.h.
Returns true if the variable declaration was by bypassed by any goto or switch statement.
Definition at line 63 of file VarBypassDetector.h.