14#ifndef LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
15#define LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
18#include "llvm/ADT/DenseMap.h"
19#include "llvm/ADT/DenseSet.h"
20#include "llvm/ADT/SmallVector.h"
46 llvm::DenseMap<const Stmt *, unsigned> ToScopes;
48 llvm::DenseSet<const VarDecl *> Bypasses;
50 bool AlwaysBypassed =
false;
58 return AlwaysBypassed || Bypasses.contains(
D);
62 bool BuildScopeInformation(
const Decl *
D,
unsigned &ParentScope);
63 bool BuildScopeInformation(
const Stmt *S,
unsigned &origParentScope);
65 void Detect(
unsigned From,
unsigned To);
The class detects jumps which bypass local variables declaration: goto L; int a; L:
bool IsBypassed(const VarDecl *D) const
Returns true if the variable declaration was by bypassed by any goto or switch statement.
Decl - This represents one declaration (or definition), e.g.
Stmt - This represents one statement.
Represents a variable declaration or definition.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
The JSON file list parser is used to communicate input to InstallAPI.