@@ -164,16 +164,14 @@ class Parser {
164
164
// / description of the error.
165
165
// / The caller takes ownership of the DynTypedMatcher object returned.
166
166
static llvm::Optional<DynTypedMatcher>
167
- parseMatcherExpression (StringRef MatcherCode, Sema *S,
168
- const NamedValueMap *NamedValues,
169
- Diagnostics *Error);
167
+ parseMatcherExpression (StringRef &MatcherCode, Sema *S,
168
+ const NamedValueMap *NamedValues, Diagnostics *Error);
170
169
static llvm::Optional<DynTypedMatcher>
171
- parseMatcherExpression (StringRef MatcherCode, Sema *S,
172
- Diagnostics *Error) {
170
+ parseMatcherExpression (StringRef &MatcherCode, Sema *S, Diagnostics *Error) {
173
171
return parseMatcherExpression (MatcherCode, S, nullptr , Error);
174
172
}
175
173
static llvm::Optional<DynTypedMatcher>
176
- parseMatcherExpression (StringRef MatcherCode, Diagnostics *Error) {
174
+ parseMatcherExpression (StringRef & MatcherCode, Diagnostics *Error) {
177
175
return parseMatcherExpression (MatcherCode, nullptr , Error);
178
176
}
179
177
@@ -189,14 +187,14 @@ class Parser {
189
187
// / \param NamedValues A map of precomputed named values. This provides
190
188
// / the dictionary for the <NamedValue> rule of the grammar.
191
189
// / If null, it is ignored.
192
- static bool parseExpression (StringRef Code, Sema *S,
190
+ static bool parseExpression (StringRef & Code, Sema *S,
193
191
const NamedValueMap *NamedValues,
194
192
VariantValue *Value, Diagnostics *Error);
195
- static bool parseExpression (StringRef Code, Sema *S,
196
- VariantValue *Value, Diagnostics *Error) {
193
+ static bool parseExpression (StringRef & Code, Sema *S, VariantValue *Value ,
194
+ Diagnostics *Error) {
197
195
return parseExpression (Code, S, nullptr , Value, Error);
198
196
}
199
- static bool parseExpression (StringRef Code, VariantValue *Value,
197
+ static bool parseExpression (StringRef & Code, VariantValue *Value,
200
198
Diagnostics *Error) {
201
199
return parseExpression (Code, nullptr , Value, Error);
202
200
}
@@ -213,14 +211,14 @@ class Parser {
213
211
// / \return The list of completions, which may be empty if there are no
214
212
// / available completions or if an error occurred.
215
213
static std::vector<MatcherCompletion>
216
- completeExpression (StringRef Code, unsigned CompletionOffset, Sema *S,
214
+ completeExpression (StringRef & Code, unsigned CompletionOffset, Sema *S,
217
215
const NamedValueMap *NamedValues);
218
216
static std::vector<MatcherCompletion>
219
- completeExpression (StringRef Code, unsigned CompletionOffset, Sema *S) {
217
+ completeExpression (StringRef & Code, unsigned CompletionOffset, Sema *S) {
220
218
return completeExpression (Code, CompletionOffset, S, nullptr );
221
219
}
222
220
static std::vector<MatcherCompletion>
223
- completeExpression (StringRef Code, unsigned CompletionOffset) {
221
+ completeExpression (StringRef & Code, unsigned CompletionOffset) {
224
222
return completeExpression (Code, CompletionOffset, nullptr );
225
223
}
226
224
0 commit comments