[all-commits] [llvm/llvm-project] ec00aa: [DomTreeUpdater] Use const auto * when iterating o...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Fri Jul 10 08:40:47 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ec00aa99dd4cd46c328219cffefcfdf8a8bd53a0
https://github.com/llvm/llvm-project/commit/ec00aa99dd4cd46c328219cffefcfdf8a8bd53a0
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-07-10 (Fri, 10 Jul 2020)
Changed paths:
M llvm/lib/Analysis/DomTreeUpdater.cpp
Log Message:
-----------
[DomTreeUpdater] Use const auto * when iterating over pointers (NFC).
This silences the warning below:
llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:20: warning: loop variable 'BB' is always a copy because the range of type 'const SmallPtrSet<llvm::BasicBlock *, 8>' does not return a reference [-Wrange-loop-analysis]
for (const auto &BB : DeletedBBs) {
^
llvm-project/llvm/lib/Analysis/DomTreeUpdater.cpp:510:8: note: use non-reference type 'llvm::BasicBlock *'
for (const auto &BB : DeletedBBs) {
^~~~~~~~~~~~~~~~
1 warning generated.
More information about the All-commits
mailing list