Author: Martin Braenne Date: 2023-04-11T11:31:56Z New Revision: 991c7e11728f6f6372e5dc865e3a4c0636a575ea
URL: https://github.com/llvm/llvm-project/commit/991c7e11728f6f6372e5dc865e3a4c0636a575ea DIFF: https://github.com/llvm/llvm-project/commit/991c7e11728f6f6372e5dc865e3a4c0636a575ea.diff LOG: [clang][dataflow][NFC] Remove unused parameter from `insertIfGlobal()`. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D148004 Added: Modified: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp Removed: ################################################################################ diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp index 6a6343b5f169b..680036b6a5b39 100644 --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -156,7 +156,6 @@ static Value &widenDistinctValues(QualType Type, Value &Prev, /// Initializes a global storage value. static void insertIfGlobal(const Decl &D, - llvm::DenseSet<const FieldDecl *> &Fields, llvm::DenseSet<const VarDecl *> &Vars) { if (auto *V = dyn_cast<VarDecl>(&D)) if (V->hasGlobalStorage()) @@ -166,7 +165,7 @@ static void insertIfGlobal(const Decl &D, static void getFieldsAndGlobalVars(const Decl &D, llvm::DenseSet<const FieldDecl *> &Fields, llvm::DenseSet<const VarDecl *> &Vars) { - insertIfGlobal(D, Fields, Vars); + insertIfGlobal(D, Vars); if (const auto *Decomp = dyn_cast<DecompositionDecl>(&D)) for (const auto *B : Decomp->bindings()) if (auto *ME = dyn_cast_or_null<MemberExpr>(B->getBinding())) @@ -191,11 +190,11 @@ static void getFieldsAndGlobalVars(const Stmt &S, for (auto *D : DS->getDeclGroup()) getFieldsAndGlobalVars(*D, Fields, Vars); } else if (auto *E = dyn_cast<DeclRefExpr>(&S)) { - insertIfGlobal(*E->getDecl(), Fields, Vars); + insertIfGlobal(*E->getDecl(), Vars); } else if (auto *E = dyn_cast<MemberExpr>(&S)) { // FIXME: should we be using `E->getFoundDecl()`? const ValueDecl *VD = E->getMemberDecl(); - insertIfGlobal(*VD, Fields, Vars); + insertIfGlobal(*VD, Vars); if (const auto *FD = dyn_cast<FieldDecl>(VD)) Fields.insert(FD); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits