Skip to content

Commit 991c7e1

Browse files
committed
[clang][dataflow][NFC] Remove unused parameter from insertIfGlobal().
Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D148004
1 parent 271853c commit 991c7e1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ static Value &widenDistinctValues(QualType Type, Value &Prev,
156156

157157
/// Initializes a global storage value.
158158
static void insertIfGlobal(const Decl &D,
159-
llvm::DenseSet<const FieldDecl *> &Fields,
160159
llvm::DenseSet<const VarDecl *> &Vars) {
161160
if (auto *V = dyn_cast<VarDecl>(&D))
162161
if (V->hasGlobalStorage())
@@ -166,7 +165,7 @@ static void insertIfGlobal(const Decl &D,
166165
static void getFieldsAndGlobalVars(const Decl &D,
167166
llvm::DenseSet<const FieldDecl *> &Fields,
168167
llvm::DenseSet<const VarDecl *> &Vars) {
169-
insertIfGlobal(D, Fields, Vars);
168+
insertIfGlobal(D, Vars);
170169
if (const auto *Decomp = dyn_cast<DecompositionDecl>(&D))
171170
for (const auto *B : Decomp->bindings())
172171
if (auto *ME = dyn_cast_or_null<MemberExpr>(B->getBinding()))
@@ -191,11 +190,11 @@ static void getFieldsAndGlobalVars(const Stmt &S,
191190
for (auto *D : DS->getDeclGroup())
192191
getFieldsAndGlobalVars(*D, Fields, Vars);
193192
} else if (auto *E = dyn_cast<DeclRefExpr>(&S)) {
194-
insertIfGlobal(*E->getDecl(), Fields, Vars);
193+
insertIfGlobal(*E->getDecl(), Vars);
195194
} else if (auto *E = dyn_cast<MemberExpr>(&S)) {
196195
// FIXME: should we be using `E->getFoundDecl()`?
197196
const ValueDecl *VD = E->getMemberDecl();
198-
insertIfGlobal(*VD, Fields, Vars);
197+
insertIfGlobal(*VD, Vars);
199198
if (const auto *FD = dyn_cast<FieldDecl>(VD))
200199
Fields.insert(FD);
201200
}

0 commit comments

Comments
 (0)