Lines Matching refs:emitError

34 FormatToken FormatLexer::emitError(SMLoc loc, const Twine &msg) {  in emitError()  function in FormatLexer
41 FormatToken FormatLexer::emitError(const char *loc, const Twine &msg) { in emitError() function in FormatLexer
42 return emitError(SMLoc::getFromPointer(loc), msg); in emitError()
92 return emitError(tokStart, "unexpected character"); in lexToken()
143 return emitError(curPtr - 1, "unexpected end of file in literal"); in lexLiteral()
148 return emitError(curPtr - 1, "expected variable name"); in lexVariable()
221 return emitError(curToken.getLoc(), in parseElement()
231 return emitError( in parseLiteral()
240 return emitError(tok.getLoc(), "expected literal, but got '" + value + "'"); in parseLiteral()
249 (void)emitError(loc, "expected valid literal but got '" + value + in parseLiteral()
280 return emitError(loc, in parseOptionalGroup()
294 return emitError(curToken.getLoc(), "only one element can be marked as " in parseOptionalGroup()
324 return emitError(loc, "optional group has no anchor element"); in parseOptionalGroup()
337 return emitError(loc, "first parsable element of an optional group must be " in parseOptionalGroup()
350 return emitError(loc, "'custom' is only valid as a top-level directive"); in parseCustomDirective()
399 StringRef value, function_ref<void(Twine)> emitError) { in canFormatStringAsKeyword() argument
401 if (emitError) in canFormatStringAsKeyword()
402 emitError("valid keyword starts with a letter or '_'"); in canFormatStringAsKeyword()
408 if (emitError) in canFormatStringAsKeyword()
409 emitError( in canFormatStringAsKeyword()
417 function_ref<void(Twine)> emitError) { in isValidLiteral() argument
419 if (emitError) in isValidLiteral()
420 emitError("literal can't be empty"); in isValidLiteral()
431 if (emitError) in isValidLiteral()
432 emitError("single character literal must be a letter or one of '" + bare + in isValidLiteral()
441 return canFormatStringAsKeyword(value, emitError); in isValidLiteral()