Skip to content

Commit

Permalink
[clang][dataflow] Fix -Wrange-loop-construct in DataflowAnalysisConte…
Browse files Browse the repository at this point in the history
…xt.cpp (NFC)

/llvm-project/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:247:10: note: use reference type 'const llvm::Sma
llVector<Atom> &' to prevent copying
    for (const llvm::SmallVector<Atom> Class : Info.EquivalentAtoms)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                       &
1 error generated.
  • Loading branch information
DamonFool committed Nov 7, 2023
1 parent 5db63d2 commit a737a33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void DataflowAnalysisContext::dumpFlowCondition(Atom Token,
}
if (!Info.EquivalentAtoms.empty()) {
OS << "Equivalent atoms:\n";
for (const llvm::SmallVector<Atom> Class : Info.EquivalentAtoms)
for (const llvm::SmallVector<Atom> &Class : Info.EquivalentAtoms)
printAtomList(Class, OS);
}

Expand Down

1 comment on commit a737a33

@martinboehme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the breakage, and thank you for the fix!

Please sign in to comment.