We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d69ccde commit 2be52f3Copy full SHA for 2be52f3
clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
@@ -285,10 +285,10 @@ SimpleLogicalContext DataflowAnalysisContext::exportLogicalContext(
285
llvm::DenseSet<dataflow::Atom> TargetTokens) const {
286
SimpleLogicalContext LC;
287
288
- if (Invariant != nullptr) {
289
- LC.Invariant = Invariant;
+ // Copy `Invariant` even if it is null, to initialize the field.
+ LC.Invariant = Invariant;
290
+ if (Invariant != nullptr)
291
getReferencedAtoms(*Invariant, TargetTokens);
- }
292
293
llvm::DenseSet<dataflow::Atom> Dependencies =
294
collectDependencies(std::move(TargetTokens));
0 commit comments