File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
include/clang/Analysis/FlowSensitive
lib/Analysis/FlowSensitive Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1919#include " clang/AST/ExprCXX.h"
2020#include " clang/AST/Type.h"
2121#include " clang/Analysis/FlowSensitive/StorageLocation.h"
22- #include " llvm/ADT/DenseSet.h"
2322#include " llvm/ADT/SetVector.h"
2423
2524namespace clang {
@@ -145,17 +144,17 @@ struct ReferencedDecls {
145144 FieldSet Fields;
146145 // / All variables with static storage duration, notably including static
147146 // / member variables and static variables declared within a function.
148- llvm::DenseSet <const VarDecl *> Globals;
147+ llvm::SetVector <const VarDecl *> Globals;
149148 // / Local variables, not including parameters or static variables declared
150149 // / within a function.
151- llvm::DenseSet <const VarDecl *> Locals;
150+ llvm::SetVector <const VarDecl *> Locals;
152151 // / Free functions and member functions which are referenced (but not
153152 // / necessarily called).
154- llvm::DenseSet <const FunctionDecl *> Functions;
153+ llvm::SetVector <const FunctionDecl *> Functions;
155154 // / When analyzing a lambda's call operator, the set of all parameters (from
156155 // / the surrounding function) that the lambda captures. Captured local
157156 // / variables are already included in `Locals` above.
158- llvm::DenseSet <const ParmVarDecl *> LambdaCapturedParams;
157+ llvm::SetVector <const ParmVarDecl *> LambdaCapturedParams;
159158};
160159
161160// / Returns declarations that are declared in or referenced from `FD`.
Original file line number Diff line number Diff line change 2222#include " clang/AST/Type.h"
2323#include " clang/Analysis/FlowSensitive/StorageLocation.h"
2424#include " clang/Basic/LLVM.h"
25- #include " llvm/ADT/DenseSet.h"
2625#include " llvm/ADT/STLExtras.h"
26+ #include " llvm/ADT/SetVector.h"
2727#include < cassert>
2828#include < iterator>
2929#include < vector>
@@ -164,21 +164,21 @@ RecordInitListHelper::RecordInitListHelper(
164164}
165165
166166static void insertIfGlobal (const Decl &D,
167- llvm::DenseSet <const VarDecl *> &Globals) {
167+ llvm::SetVector <const VarDecl *> &Globals) {
168168 if (auto *V = dyn_cast<VarDecl>(&D))
169169 if (V->hasGlobalStorage ())
170170 Globals.insert (V);
171171}
172172
173173static void insertIfLocal (const Decl &D,
174- llvm::DenseSet <const VarDecl *> &Locals) {
174+ llvm::SetVector <const VarDecl *> &Locals) {
175175 if (auto *V = dyn_cast<VarDecl>(&D))
176176 if (V->hasLocalStorage () && !isa<ParmVarDecl>(V))
177177 Locals.insert (V);
178178}
179179
180180static void insertIfFunction (const Decl &D,
181- llvm::DenseSet <const FunctionDecl *> &Funcs) {
181+ llvm::SetVector <const FunctionDecl *> &Funcs) {
182182 if (auto *FD = dyn_cast<FunctionDecl>(&D))
183183 Funcs.insert (FD);
184184}
You can’t perform that action at this time.
0 commit comments