[clang] 8c6e96d - [clang][Dataflow] Fix unnecessary copy in `initializeFieldsWithValues` (NFC)
Antonio Frighetto via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 02:07:15 PST 2024
Author: Antonio Frighetto
Date: 2024-02-13T11:05:26+01:00
New Revision: 8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74
URL: https://github.com/llvm/llvm-project/commit/8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74
DIFF: https://github.com/llvm/llvm-project/commit/8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74.diff
LOG: [clang][Dataflow] Fix unnecessary copy in `initializeFieldsWithValues` (NFC)
Added:
Modified:
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 93a9dac3bc905f..d487944ce92111 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -939,7 +939,7 @@ void Environment::initializeFieldsWithValues(RecordStorageLocation &Loc,
}
};
- for (const auto [Field, FieldLoc] : Loc.children()) {
+ for (const auto &[Field, FieldLoc] : Loc.children()) {
assert(Field != nullptr);
QualType FieldType = Field->getType();
More information about the cfe-commits
mailing list