[all-commits] [llvm/llvm-project] e52a8b: [NFC][clang] Fix static analyzer concerns about AU...
smanna12 via All-commits
all-commits at lists.llvm.org
Fri Apr 28 18:59:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e52a8b89addaec496fd726a3a90bcf82d42065c9
https://github.com/llvm/llvm-project/commit/e52a8b89addaec496fd726a3a90bcf82d42065c9
Author: Manna, Soumi <soumi.manna at intel.com>
Date: 2023-04-28 (Fri, 28 Apr 2023)
Changed paths:
M clang/lib/AST/ODRHash.cpp
M clang/lib/Basic/TargetID.cpp
M clang/lib/Tooling/Syntax/Tokens.cpp
Log Message:
-----------
[NFC][clang] Fix static analyzer concerns about AUTO_CAUSES_COPY
Reported by Coverity:
AUTO_CAUSES_COPY
Unnecessary object copies can affect performance
1. Inside "ODRHash.cpp" file, in clang::ODRHash::AddCXXRecordDecl(clang::CXXRecordDecl const *): Using the auto keyword without an & causes the copy of an object of type CXXBaseSpecifier.
2. Inside "Tokens.cpp" file, in clang::syntax::TokenBuffer::dumpForTests[abi:cxx11](): Using the auto keyword without an & causes the copy of an object of type DenseMapPair.
3. Inside "TargetID.cpp" file, in clang::getCanonicalTargetID[abi:cxx11](llvm::StringRef, llvm::StringMap<bool, llvm::MallocAllocator> const &): Using the auto keyword without an & causes the copy of an object of type pair.
Reviewed By: tahonermann, aaron.ballman
Differential Revision: https://reviews.llvm.org/D148639
More information about the All-commits
mailing list