@@ -164,16 +164,14 @@ class Parser {
164164 // / description of the error.
165165 // / The caller takes ownership of the DynTypedMatcher object returned.
166166 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);
170169 static llvm::Optional<DynTypedMatcher>
171- parseMatcherExpression (StringRef MatcherCode, Sema *S,
172- Diagnostics *Error) {
170+ parseMatcherExpression (StringRef &MatcherCode, Sema *S, Diagnostics *Error) {
173171 return parseMatcherExpression (MatcherCode, S, nullptr , Error);
174172 }
175173 static llvm::Optional<DynTypedMatcher>
176- parseMatcherExpression (StringRef MatcherCode, Diagnostics *Error) {
174+ parseMatcherExpression (StringRef & MatcherCode, Diagnostics *Error) {
177175 return parseMatcherExpression (MatcherCode, nullptr , Error);
178176 }
179177
@@ -189,14 +187,14 @@ class Parser {
189187 // / \param NamedValues A map of precomputed named values. This provides
190188 // / the dictionary for the <NamedValue> rule of the grammar.
191189 // / If null, it is ignored.
192- static bool parseExpression (StringRef Code, Sema *S,
190+ static bool parseExpression (StringRef & Code, Sema *S,
193191 const NamedValueMap *NamedValues,
194192 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) {
197195 return parseExpression (Code, S, nullptr , Value, Error);
198196 }
199- static bool parseExpression (StringRef Code, VariantValue *Value,
197+ static bool parseExpression (StringRef & Code, VariantValue *Value,
200198 Diagnostics *Error) {
201199 return parseExpression (Code, nullptr , Value, Error);
202200 }
@@ -213,14 +211,14 @@ class Parser {
213211 // / \return The list of completions, which may be empty if there are no
214212 // / available completions or if an error occurred.
215213 static std::vector<MatcherCompletion>
216- completeExpression (StringRef Code, unsigned CompletionOffset, Sema *S,
214+ completeExpression (StringRef & Code, unsigned CompletionOffset, Sema *S,
217215 const NamedValueMap *NamedValues);
218216 static std::vector<MatcherCompletion>
219- completeExpression (StringRef Code, unsigned CompletionOffset, Sema *S) {
217+ completeExpression (StringRef & Code, unsigned CompletionOffset, Sema *S) {
220218 return completeExpression (Code, CompletionOffset, S, nullptr );
221219 }
222220 static std::vector<MatcherCompletion>
223- completeExpression (StringRef Code, unsigned CompletionOffset) {
221+ completeExpression (StringRef & Code, unsigned CompletionOffset) {
224222 return completeExpression (Code, CompletionOffset, nullptr );
225223 }
226224
0 commit comments