aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/SourceCodeBuildersTest.cpp
diff options
context:
space:
mode:
authorFelix Berger <flx@google.com>2020-11-20 16:31:52 -0500
committerFelix Berger <flx@google.com>2020-12-10 16:58:17 -0500
commit671ad580610ad91139358b7786e02ff70433a90e (patch)
tree2b5f156680772db8bb3f34481a592b7dfcf77fb6 /clang/unittests/Tooling/SourceCodeBuildersTest.cpp
parent0978c83e6fcc7a8aea18e24eb3b2ad5523581757 (diff)
downloadllvm-671ad580610ad91139358b7786e02ff70433a90e.zip
llvm-671ad580610ad91139358b7786e02ff70433a90e.tar.gz
llvm-671ad580610ad91139358b7786e02ff70433a90e.tar.bz2
[clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.
Extend the check to not only look at the variable the unnecessarily copied variable is initialized from, but also ensure that any variable the old variable references is not modified. Extend DeclRefExprUtils to also count references and pointers to const assigned from the DeclRef we check for const usages. Reviewed-by: aaron.ballman Differential Revision: https://reviews.llvm.org/D91893
Diffstat (limited to 'clang/unittests/Tooling/SourceCodeBuildersTest.cpp')
0 files changed, 0 insertions, 0 deletions