diff --git a/clang/include/clang/Analysis/FlowSensitive/ASTOps.h b/clang/include/clang/Analysis/FlowSensitive/ASTOps.h index a404b06cd62ca..3e57f30dd2053 100644 --- a/clang/include/clang/Analysis/FlowSensitive/ASTOps.h +++ b/clang/include/clang/Analysis/FlowSensitive/ASTOps.h @@ -19,7 +19,6 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/Type.h" #include "clang/Analysis/FlowSensitive/StorageLocation.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SetVector.h" namespace clang { @@ -145,17 +144,17 @@ struct ReferencedDecls { FieldSet Fields; /// All variables with static storage duration, notably including static /// member variables and static variables declared within a function. - llvm::DenseSet Globals; + llvm::SetVector Globals; /// Local variables, not including parameters or static variables declared /// within a function. - llvm::DenseSet Locals; + llvm::SetVector Locals; /// Free functions and member functions which are referenced (but not /// necessarily called). - llvm::DenseSet Functions; + llvm::SetVector Functions; /// When analyzing a lambda's call operator, the set of all parameters (from /// the surrounding function) that the lambda captures. Captured local /// variables are already included in `Locals` above. - llvm::DenseSet LambdaCapturedParams; + llvm::SetVector LambdaCapturedParams; }; /// Returns declarations that are declared in or referenced from `FD`. diff --git a/clang/lib/Analysis/FlowSensitive/ASTOps.cpp b/clang/lib/Analysis/FlowSensitive/ASTOps.cpp index 7ce6b03fc0e71..e8113fc094037 100644 --- a/clang/lib/Analysis/FlowSensitive/ASTOps.cpp +++ b/clang/lib/Analysis/FlowSensitive/ASTOps.cpp @@ -22,8 +22,8 @@ #include "clang/AST/Type.h" #include "clang/Analysis/FlowSensitive/StorageLocation.h" #include "clang/Basic/LLVM.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SetVector.h" #include #include #include @@ -164,21 +164,21 @@ RecordInitListHelper::RecordInitListHelper( } static void insertIfGlobal(const Decl &D, - llvm::DenseSet &Globals) { + llvm::SetVector &Globals) { if (auto *V = dyn_cast(&D)) if (V->hasGlobalStorage()) Globals.insert(V); } static void insertIfLocal(const Decl &D, - llvm::DenseSet &Locals) { + llvm::SetVector &Locals) { if (auto *V = dyn_cast(&D)) if (V->hasLocalStorage() && !isa(V)) Locals.insert(V); } static void insertIfFunction(const Decl &D, - llvm::DenseSet &Funcs) { + llvm::SetVector &Funcs) { if (auto *FD = dyn_cast(&D)) Funcs.insert(FD); }