/freebsd/contrib/llvm-project/llvm/lib/MC/MCParser/ |
H A D | WasmAsmParser.cpp | 38 MCAsmLexer *Lexer = nullptr; member in __anon8dbf0ae10111::WasmAsmParser 53 Lexer = &Parser->getLexer(); in Initialize() 78 auto Ok = Lexer->is(Kind); in isNext() 87 Lexer->getTok()); in expect() 129 if (Lexer->isNot(AsmToken::Comma)) in parseGroup() 132 if (Lexer->is(AsmToken::Integer)) { in parseGroup() 138 if (Lexer->is(AsmToken::Comma)) { in parseGroup() 157 if (Lexer->isNot(AsmToken::String)) in parseSectionDirective() 158 return error("expected string in directive, instead got: ", Lexer->getTok()); in parseSectionDirective() 241 if (!Lexer->is(AsmToken::Identifier)) in parseDirectiveType() [all …]
|
H A D | AsmParser.cpp | 120 AsmLexer Lexer; member in __anon4b9616090111::AsmParser 226 MCAsmLexer &getLexer() override { return Lexer; } in getLexer() 254 Lexer.setLexMasmIntegers(V); in setParsingMSInlineAsm() 728 MCAsmLexer &Lexer; member in __anon4b9616090111::HLASMAsmParser 732 while (Lexer.is(AsmToken::Space)) in lexLeadingSpaces() 733 Lexer.Lex(); in lexLeadingSpaces() 743 : AsmParser(SM, Ctx, Out, MAI, CB), Lexer(getLexer()), Out(Out) { in HLASMAsmParser() 744 Lexer.setSkipSpace(false); in HLASMAsmParser() 745 Lexer.setAllowHashInIdentifier(true); in HLASMAsmParser() 746 Lexer.setLexHLASMIntegers(true); in HLASMAsmParser() [all …]
|
H A D | MasmParser.cpp | 380 AsmLexer Lexer; member in __anon60b61cd60111::MasmParser 495 MCAsmLexer &getLexer() override { return Lexer; } in getLexer() 525 Lexer.setLexMasmIntegers(V); in setParsingMSInlineAsm() 1094 : Lexer(MAI), Ctx(Ctx), Out(Out), MAI(MAI), SrcMgr(SM), in MasmParser() 1102 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in MasmParser() 1168 SrcMgr.AddIncludeFile(Filename, Lexer.getLoc(), IncludedFile); in enterIncludeFile() 1173 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer()); in enterIncludeFile() 1181 Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(), in jumpToLoc() 1194 Lexer.Lex(); in expandMacros() 1196 Lexer.UnLex(AsmToken(AsmToken::Error, MacroId)); in expandMacros() [all …]
|
H A D | XCOFFAsmParser.cpp | 20 MCAsmLexer *Lexer = nullptr; member in __anon7e8d831f0111::XCOFFAsmParser 35 Lexer = &Parser->getLexer(); in Initialize()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/AsmParser/ |
H A D | WebAssemblyAsmParser.cpp | 198 MCAsmLexer &Lexer; member in __anon9b7df71c0111::WebAssemblyAsmParser 246 Lexer(Parser.getLexer()), is64(STI.getTargetTriple().isArch64Bit()), in WebAssemblyAsmParser() 284 return Parser.Error(Loc.isValid() ? Loc : Lexer.getTok().getLoc(), Msg); in error() 349 auto Ok = Lexer.is(Kind); in isNext() 358 Lexer.getTok()); in expect() 363 if (!Lexer.is(AsmToken::Identifier)) { in expectIdent() 364 error("Expected identifier, got: ", Lexer.getTok()); in expectIdent() 367 auto Name = Lexer.getTok().getString(); in expectIdent() 373 while (Lexer.is(AsmToken::Identifier)) { in parseRegTypeList() 374 auto Type = WebAssembly::parseType(Lexer.getTok().getString()); in parseRegTypeList() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Lex/ |
H A D | Lexer.cpp | 126 void Lexer::anchor() {} in anchor() 128 void Lexer::InitLexer(const char *BufStart, const char *BufPtr, in InitLexer() 184 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &InputFile, in Lexer() function in Lexer 199 Lexer::Lexer(SourceLocation fileloc, const LangOptions &langOpts, in Lexer() function in Lexer 213 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &FromFile, in Lexer() function in Lexer 216 : Lexer(SM.getLocForStartOfFile(FID), langOpts, FromFile.getBufferStart(), in Lexer() 220 void Lexer::resetExtendedTokenMode() { in resetExtendedTokenMode() 243 Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, in Create_PragmaLexer() 252 Lexer *L = new Lexer(SpellingFID, InputFile, PP); in Create_PragmaLexer() 278 void Lexer::seek(unsigned Offset, bool IsAtStartOfLine) { in seek() [all …]
|
H A D | LiteralSupport.cpp | 86 Lexer::AdvanceToTokenCharacter(TokLoc, TokRangeBegin - TokBegin, in MakeCharSourceRange() 89 Lexer::AdvanceToTokenCharacter(Begin, TokRangeEnd - TokRangeBegin, in MakeCharSourceRange() 104 Lexer::AdvanceToTokenCharacter(TokLoc, TokRangeBegin - TokBegin, in Diag() 1199 Diags.Report(Lexer::AdvanceToTokenCharacter( in NumericLiteralParser() 1224 Lexer::AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin, SM, LangOpts), in ParseDecimalOrOctalCommon() 1252 Diags.Report(Lexer::AdvanceToTokenCharacter( in ParseDecimalOrOctalCommon() 1302 Diags.Report(Lexer::AdvanceToTokenCharacter(TokLoc, Pos - ThisTokBegin, SM, in checkSeparator() 1343 Diags.Report(Lexer::AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin, SM, in ParseNumberStartingWithZero() 1362 Diags.Report(Lexer::AdvanceToTokenCharacter( in ParseNumberStartingWithZero() 1379 Diags.Report(Lexer::AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin, SM, in ParseNumberStartingWithZero() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/AST/ |
H A D | CommentLexer.cpp | 21 void Token::dump(const Lexer &L, const SourceManager &SM) const { in dump() 57 StringRef Lexer::resolveHTMLNamedCharacterReference(StringRef Name) const { in resolveHTMLNamedCharacterReference() 69 StringRef Lexer::resolveHTMLDecimalCharacterReference(StringRef Name) const { in resolveHTMLDecimalCharacterReference() 79 StringRef Lexer::resolveHTMLHexCharacterReference(StringRef Name) const { in resolveHTMLHexCharacterReference() 90 void Lexer::skipLineStartingDecorations() { in skipLineStartingDecorations() 260 void Lexer::formTokenWithChars(Token &Result, const char *TokEnd, in formTokenWithChars() 273 const char *Lexer::skipTextToken() { in skipTextToken() 296 void Lexer::lexCommentText(Token &T) { in lexCommentText() 459 void Lexer::setupAndLexVerbatimBlock(Token &T, in setupAndLexVerbatimBlock() 484 void Lexer::lexVerbatimBlockFirstLine(Token &T) { in lexVerbatimBlockFirstLine() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/Transformer/ |
H A D | SourceCode.cpp | 33 return Lexer::getSourceText(Range, Context.getSourceManager(), in getText() 40 CharSourceRange R = Lexer::getAsCharRange(Range, Context.getSourceManager(), in maybeExtendRange() 46 Lexer::getRawToken(R.getEnd(), Tok, Context.getSourceManager(), in maybeExtendRange() 158 Range = Lexer::makeFileCharRange(EditRange, SM, LangOpts); in getRange() 168 E = Lexer::getLocForEndOfToken(E, 0, SM, LangOpts); in getRange() 228 std::unique_ptr<Lexer> Lexer = [&]() { in getEntityEndLoc() local 233 return std::make_unique<clang::Lexer>( in getEntityEndLoc() 239 Lexer->SetKeepWhitespaceMode(true); in getEntityEndLoc() 271 Lexer->LexFromRawLexer(Tok); in getEntityEndLoc() 284 Lexer->LexFromRawLexer(Tok); in getEntityEndLoc() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Lanai/AsmParser/ |
H A D | LanaiAsmParser.cpp | 89 Lexer(Parser.getLexer()), SubtargetInfo(STI) { in LanaiAsmParser() 96 MCAsmLexer &Lexer; member in __anon93849a6a0111::LanaiAsmParser 696 if (Lexer.getKind() == AsmToken::Percent) { in parseRegister() 700 if (Lexer.getKind() == AsmToken::Identifier) { in parseRegister() 701 RegNum = MatchRegisterName(Lexer.getTok().getIdentifier()); in parseRegister() 704 Lexer.UnLex(*PercentTok); in parseRegister() 711 Lexer.UnLex(*PercentTok); in parseRegister() 744 if (Lexer.getKind() != AsmToken::Identifier) in parseIdentifier() 760 if (Lexer.getKind() != AsmToken::LParen) { in parseIdentifier() 761 Error(Lexer.getLoc(), "Expected '('"); in parseIdentifier() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/AST/ |
H A D | CommentLexer.h | 26 class Lexer; variable 56 friend class Lexer; variable 216 void dump(const Lexer &L, const SourceManager &SM) const; 220 class Lexer { 222 Lexer(const Lexer &) = delete; 223 void operator=(const Lexer &) = delete; 352 Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags,
|
H A D | CommentBriefParser.h | 30 Lexer &L; 44 BriefParser(Lexer &L, const CommandTraits &Traits);
|
H A D | CommentParser.h | 35 Lexer &L; 88 Parser(Lexer &L, Sema &S, llvm::BumpPtrAllocator &Allocator,
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/Inclusions/ |
H A D | HeaderIncludes.cpp | 42 llvm::function_ref<unsigned(const SourceManager &, Lexer &, Token &)> in getOffsetAfterTokenSequence() argument 47 Lexer Lex(SM.getMainFileID(), SM.getBufferOrFake(SM.getMainFileID()), SM, in getOffsetAfterTokenSequence() 60 Lexer &Lex, StringRef Name, Token &Tok, in checkAndConsumeDirectiveWithName() 72 void skipComments(Lexer &Lex, Token &Tok) { in skipComments() 88 [&](std::function<unsigned(const SourceManager &SM, Lexer &Lex, in getOffsetAfterHeaderGuardsAndComments() 93 [&Consume](const SourceManager &SM, Lexer &Lex, Token Tok) { in getOffsetAfterHeaderGuardsAndComments() 102 [](const SourceManager &SM, Lexer &Lex, Token Tok) -> unsigned { in getOffsetAfterHeaderGuardsAndComments() 113 [](const SourceManager &SM, Lexer &Lex, Token Tok) -> unsigned { in getOffsetAfterHeaderGuardsAndComments() 125 bool checkAndConsumeInclusiveDirective(Lexer &Lex, Token &Tok) { in checkAndConsumeInclusiveDirective() 163 [](const SourceManager &SM, Lexer &Lex, Token Tok) { in getMaxHeaderInsertionOffset()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/AsmParser/ |
H A D | HexagonAsmParser.cpp | 610 MCAsmLexer &Lexer = getLexer(); in eatToEndOfPacket() local 611 while (!Lexer.is(AsmToken::RCurly)) in eatToEndOfPacket() 612 Lexer.Lex(); in eatToEndOfPacket() 613 Lexer.Lex(); in eatToEndOfPacket() 929 MCAsmLexer &Lexer = getLexer(); in parseOperand() local 948 const AsmToken &MaybeDotNew = Lexer.getTok(); in parseOperand() 966 const AsmToken &MaybeDotNew = Lexer.getTok(); in parseOperand() 984 MCAsmLexer &Lexer = getLexer(); in isLabel() local 985 AsmToken const &Second = Lexer.getTok(); in isLabel() 986 AsmToken Third = Lexer.peekTok(); in isLabel() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/Tooling/Refactoring/ |
H A D | RecursiveSymbolVisitor.h | 54 Lexer::getLocForEndOfToken(Initializer->getSourceLocation(), in VisitCXXConstructorDecl() 89 Lexer::getLocForEndOfToken(TypeBeginLoc, 0, SM, LangOpts); in VisitTypeLoc() 110 Lexer::getLocForEndOfToken(TL.getBeginLoc(), 0, SM, LangOpts); in VisitTypedefTypeLoc() 147 return visit(ND, Loc, Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts)); in visit()
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-mca/ |
H A D | CodeRegionGenerator.cpp | 50 MCAsmLexer &Lexer = Parser->getLexer(); in parseCodeRegions() local 52 Lexer.setCommentConsumer(CCP); in parseCodeRegions() 54 Lexer.setLexMasmIntegers(true); in parseCodeRegions()
|
/freebsd/contrib/llvm-project/clang/lib/Analysis/ |
H A D | IssueHash.cpp | 158 Lexer Lexer(SM.getLocForStartOfFile(SM.getFileID(StartOfLine)), LangOpts, in NormalizeLine() local 163 while (!Lexer.LexFromRawLexer(Token) && NextStart < 2) { in NormalizeLine()
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/Refactoring/Extract/ |
H A D | SourceExtraction.cpp | 24 return Lexer::getSourceText( in isSemicolonAtLocation() 104 std::optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); in compute()
|
/freebsd/contrib/llvm-project/clang/lib/ARCMigrate/ |
H A D | Transforms.cpp | 134 if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOpts(), &loc)) in findSemiAfterLocation() 137 loc = Lexer::getLocForEndOfToken(loc, /*Offset=*/0, SM, Ctx.getLangOpts()); in findSemiAfterLocation() 151 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in findSemiAfterLocation() 399 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in rewritePropertyAttribute() 480 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), in addPropertyAttribute() 542 str += Lexer::getSourceText( in GCRewriteFinalize()
|
/freebsd/contrib/llvm-project/clang/lib/Edit/ |
H A D | EditedSource.cpp | 47 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc() 317 return !(Lexer::isAsciiIdentifierContinueChar(left, LangOpts) && in canBeJoined() 318 Lexer::isAsciiIdentifierContinueChar(right, LangOpts)); in canBeJoined() 341 SourceLocation BeginTokLoc = Lexer::GetBeginningOfToken(Loc, SM, LangOpts); in adjustRemoval() 463 return Lexer::getSourceText(CharSourceRange::getCharRange(BLoc, ELoc), in getSourceText()
|
/freebsd/contrib/llvm-project/clang/include/clang/Lex/ |
H A D | Preprocessor.h | 753 std::unique_ptr<Lexer> CurLexer; 787 std::unique_ptr<Lexer> TheLexer; 795 std::unique_ptr<Lexer> &&TheLexer, in IncludeStackInfo() 2074 return Lexer::getSpelling(loc, buffer, SourceMgr, LangOpts, invalid); 2086 return Lexer::getSpelling(Tok, SourceMgr, LangOpts, Invalid); 2103 return Lexer::getSpelling(Tok, Buffer, SourceMgr, LangOpts, Invalid); 2118 return Lexer::getRawToken(Loc, Result, SourceMgr, LangOpts, IgnoreWhiteSpace); 2149 return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOpts()); in getImmediateMacroName() 2182 return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); 2192 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, [all …]
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
H A D | CheckerContext.cpp | 133 return Lexer::getImmediateMacroName(Loc, getSourceManager(), in getMacroNameOrSpelling() 136 return Lexer::getSpelling(Loc, buf, getSourceManager(), getLangOpts()); in getMacroNameOrSpelling()
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-mc/ |
H A D | llvm-mc.cpp | 279 AsmLexer Lexer(MAI); in AsLexInput() local 280 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput() 283 while (Lexer.Lex().isNot(AsmToken::Eof)) { in AsLexInput() 284 Lexer.getTok().dump(OS); in AsLexInput() 286 if (Lexer.getTok().getKind() == AsmToken::Error) in AsLexInput()
|
/freebsd/contrib/llvm-project/clang/lib/Frontend/Rewrite/ |
H A D | InclusionRewriter.cpp | 92 void CommentOutDirective(Lexer &DirectivesLex, const Token &StartToken, 101 StringRef NextIdentifierName(Lexer &RawLex, Token &RawToken); 334 void InclusionRewriter::CommentOutDirective(Lexer &DirectiveLex, in CommentOutDirective() 369 StringRef InclusionRewriter::NextIdentifierName(Lexer &RawLex, in NextIdentifierName() 391 Lexer RawLex(FileId, FromFile, PP.getSourceManager(), PP.getLangOpts()); in Process()
|