aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2018-08-10 08:25:51 +0000
committerHaojian Wu <hokein@google.com>2018-08-10 08:25:51 +0000
commit25efa0fad3d042591190263727eadfd0b33d6543 (patch)
tree6bd8e2d8dde08893dc7d5e941ac5b861028f45ad /clang/lib/CodeGen/CodeGenModule.cpp
parent75a954330bfbba52adfc914c8d968ddc888e7a66 (diff)
downloadllvm-25efa0fad3d042591190263727eadfd0b33d6543.zip
llvm-25efa0fad3d042591190263727eadfd0b33d6543.tar.gz
llvm-25efa0fad3d042591190263727eadfd0b33d6543.tar.bz2
[clang-tidy] Omit cases where loop variable is not used in loop body in
performance-for-range-copy check. Summary: The upstream change r336737 make the check too smart to fix the case where loop variable could be used as `const auto&`. But for the case below, changing to `const auto _` will introduce an unused complier warning. ``` for (auto _ : state) { // no references for _. } ``` This patch omit this case, and it is safe to do it as the case is very rare. Reviewers: ilya-biryukov, alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D50447 llvm-svn: 339415
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions