Skip to content

Commit cf75290

Browse files
authored
Fix static analyzer issues (#8506)
This change fixes two issues reported by static analyzer: 1. Uninitialized pointer field 2. AUTO_CAUSES_COPY Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
1 parent 230d562 commit cf75290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/Support/SimpleTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class SimpleTable {
6666
Row(SimpleTable *Parent) : Parent(Parent) {}
6767

6868
Row(SimpleTable *Parent, ArrayRef<StringRef> R) : Row(Parent) {
69-
for (auto Cell : R)
69+
for (auto &Cell : R)
7070
Cells.emplace_back(Cell.str());
7171
}
7272

@@ -76,7 +76,7 @@ class SimpleTable {
7676

7777
private:
7878
std::vector<std::string> Cells;
79-
SimpleTable *Parent;
79+
SimpleTable *Parent = nullptr;
8080
};
8181

8282
public:

0 commit comments

Comments
 (0)