Skip to content

Commit ca69444

Browse files
authored
[Clang] Fix a variable shadowing in MapLattice (NFC) (#95697)
Reported in https://pvs-studio.com/en/blog/posts/cpp/1126/, fragment N10. The PVS-Studio warning: V570 The 'C' variable is assigned to itself. MapLattice.h:52
1 parent 9107338 commit ca69444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang/Analysis/FlowSensitive/MapLattice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ template <typename Key, typename ElementLattice> class MapLattice {
4949

5050
MapLattice() = default;
5151

52-
explicit MapLattice(Container C) { C = std::move(C); }
52+
explicit MapLattice(Container C) : C{std::move(C)} {};
5353

5454
// The `bottom` element is the empty map.
5555
static MapLattice bottom() { return MapLattice(); }

0 commit comments

Comments
 (0)