Skip to content

Commit 4e06e02

Browse files
committed
Add some comments.
Created using spr 1.3.6
1 parent 5154d7c commit 4e06e02

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/include/llvm/Support/SpecialCaseList.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ class SpecialCaseList {
129129
std::string Name;
130130
unsigned LineNo;
131131
GlobPattern Pattern;
132+
// neither copyable nor movable because GlobPattern contains StringRef.
133+
Glob(Glob &&) = delete;
134+
Glob() = default;
132135
};
133136

134137
std::vector<std::unique_ptr<Matcher::Glob>> Globs;

llvm/lib/Support/SpecialCaseList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber,
5656
auto Glob = std::make_unique<Matcher::Glob>();
5757
Glob->Name = Pattern.str();
5858
Glob->LineNo = LineNumber;
59-
// We must be sure to use the string in the map rather than the provided
59+
// We must be sure to use the string in `Glob` rather than the provided
6060
// reference which could be destroyed before match() is called
6161
if (auto Err = GlobPattern::create(Glob->Name, /*MaxSubPatterns=*/1024)
6262
.moveInto(Glob->Pattern))

0 commit comments

Comments
 (0)