]> granicus.if.org Git - clang/commit
StaticAnalyzer: Avoid an unintentional copy
authorJustin Bogner <mail@justinbogner.com>
Tue, 22 Mar 2016 17:50:05 +0000 (17:50 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 22 Mar 2016 17:50:05 +0000 (17:50 +0000)
commit9872ddf47c0247ab5e43568947fed51759e83755
tree1c7cc80097d38f0fb5463071365d4446aa88258c
parent1296e32d98d76d29be7a619126aef9d71072a338
StaticAnalyzer: Avoid an unintentional copy

The range here isn't over references, so using `auto &` here incites a
copy. Switching to `auto *` would do, but we might as well list an
explicit type for clarity.

Found by -Wrange-loop-analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264071 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/PaddingChecker.cpp