| /freebsd-12.1/contrib/llvm/lib/TableGen/ |
| H A D | Error.cpp | 24 SourceMgr SrcMgr; 27 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage() 31 if (Kind == SourceMgr::DK_Error) in PrintMessage() 39 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage() 44 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote() 48 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning() 52 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning() 58 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError() 62 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
|
| /freebsd-12.1/contrib/llvm/include/llvm/Support/ |
| H A D | FileCheck.h | 122 bool ParsePattern(StringRef PatternStr, StringRef Prefix, SourceMgr &SM, 126 void PrintVariableUses(const SourceMgr &SM, StringRef Buffer, 129 void PrintFuzzyMatch(const SourceMgr &SM, StringRef Buffer, 142 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM); 148 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM); 230 bool CheckNext(const SourceMgr &SM, StringRef Buffer) const; 231 bool CheckSame(const SourceMgr &SM, StringRef Buffer) const; 232 bool CheckNot(const SourceMgr &SM, StringRef Buffer, 237 size_t CheckDag(const SourceMgr &SM, StringRef Buffer, 263 bool ReadCheckFile(SourceMgr &SM, StringRef Buffer, Regex &PrefixRE, [all …]
|
| H A D | SourceMgr.h | 42 class SourceMgr { 107 SourceMgr() = default; 108 SourceMgr(const SourceMgr &) = delete; 109 SourceMgr &operator=(const SourceMgr &) = delete; 110 ~SourceMgr() = default; 261 const SourceMgr *SM = nullptr; 266 SourceMgr::DiagKind Kind = SourceMgr::DK_Error; 279 SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN, 280 int Line, int Col, SourceMgr::DiagKind Kind, 285 const SourceMgr *getSourceMgr() const { return SM; } in getSourceMgr() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Format/ |
| H A D | UsingDeclarationsSorter.cpp | 117 const SourceManager &SourceMgr, tooling::Replacements *Fixes) { in endUsingDeclarationBlock() argument 161 StringRef Text(SourceMgr.getCharacterData(SortedBegin), in endUsingDeclarationBlock() 162 SourceMgr.getCharacterData(SortedEnd) - in endUsingDeclarationBlock() 163 SourceMgr.getCharacterData(SortedBegin)); in endUsingDeclarationBlock() 165 StringRef OldText(SourceMgr.getCharacterData(Begin), in endUsingDeclarationBlock() 166 SourceMgr.getCharacterData(End) - in endUsingDeclarationBlock() 167 SourceMgr.getCharacterData(Begin)); in endUsingDeclarationBlock() 189 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local 197 endUsingDeclarationBlock(&UsingDeclarations, SourceMgr, &Fixes); in analyze() 201 endUsingDeclarationBlock(&UsingDeclarations, SourceMgr, &Fixes); in analyze() [all …]
|
| H A D | WhitespaceManager.h | 40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument 42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager() 91 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile() 95 const SourceManager &SourceMgr; 206 const SourceManager &SourceMgr; variable
|
| H A D | AffectedRangeManager.h | 28 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument 30 : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {} in AffectedRangeManager() 59 const SourceManager &SourceMgr; variable
|
| H A D | NamespaceEndCommentsFixer.cpp | 86 const SourceManager &SourceMgr, in addEndComment() argument 90 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, EndCommentText)); in addEndComment() 98 const SourceManager &SourceMgr, in updateEndComment() argument 104 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, EndCommentText)); in updateEndComment() 138 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local 171 updateEndComment(EndCommentPrevTok, std::string(), SourceMgr, &Fixes); in analyze() 197 addEndComment(EndCommentPrevTok, EndCommentText, SourceMgr, &Fixes); in analyze() 199 updateEndComment(EndCommentPrevTok, EndCommentText, SourceMgr, &Fixes); in analyze()
|
| H A D | UnwrappedLineFormatter.h | 35 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument 38 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter() 72 const SourceManager &SourceMgr; variable
|
| H A D | FormatTokenLexer.cpp | 30 Column(Column), TrailingWhitespace(0), SourceMgr(SourceMgr), ID(ID), 35 Lex.reset(new Lexer(ID, SourceMgr.getBuffer(ID), SourceMgr, 266 resetLexer(SourceMgr.getFileOffset(Lex->getSourceLocation(Offset))); in tryParseJSRegexLiteral() 332 : SourceMgr.getLocForEndOfFile(ID); in handleTemplateStrings() 333 resetLexer(SourceMgr.getFileOffset(loc)); in handleTemplateStrings() 353 : SourceMgr.getLocForEndOfFile(ID); in tryParsePythonComment() 354 resetLexer(SourceMgr.getFileOffset(Loc)); in tryParsePythonComment() 410 std::tie(ID, FirstInLineOffset) = SourceMgr.getDecomposedLoc( in tryMergeConflictMarkers() 412 StringRef Buffer = SourceMgr.getBuffer(ID)->getBuffer(); in tryMergeConflictMarkers() 716 StringRef Buffer = SourceMgr.getBufferData(ID); in resetLexer() [all …]
|
| /freebsd-12.1/contrib/llvm/lib/Support/ |
| H A D | FileCheck.cpp | 57 PatternLoc, SourceMgr::DK_Error, in ParsePattern() 95 SourceMgr::DK_Error, in ParsePattern() 127 SourceMgr::DK_Error, in ParsePattern() 434 const SourceMgr &SM, StringRef Buffer, in PrintFuzzyMatch() 509 SourceMgr::DK_Error, in FindRegexVarEnd() 853 SourceMgr::DK_Error, in ReadCheckFile() 922 Loc, ExpectedMatch ? SourceMgr::DK_Remark : SourceMgr::DK_Error, Message); in PrintMatch() 956 Loc, ExpectedMatch ? SourceMgr::DK_Error : SourceMgr::DK_Remark, Message); in PrintNoMatch() 1110 SM.PrintMessage(Loc, SourceMgr::DK_Error, in CheckNext() 1120 SM.PrintMessage(Loc, SourceMgr::DK_Error, in CheckNext() [all …]
|
| H A D | SourceMgr.cpp | 41 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile() 109 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer() 116 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer() 169 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage() 248 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage() 249 SourceMgr::DiagKind Kind, in PrintMessage() 255 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage() 399 case SourceMgr::DK_Error: in print() 402 case SourceMgr::DK_Warning: in print() 405 case SourceMgr::DK_Note: in print() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/AST/ |
| H A D | RawCommentList.cpp | 109 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument 115 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment() 129 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment() 133 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment() 159 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow() 170 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow() 318 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment() 335 BeforeThanCompare<RawComment>(SourceMgr)); in addDeserializedComments() 341 llvm::StringRef CommentText = getRawText(SourceMgr); in getFormattedText() 375 llvm::StringRef TokText = L.getSpelling(Tok, SourceMgr); in getFormattedText() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/clang/include/clang/AST/ |
| H A D | RawCommentList.h | 43 RawComment(const SourceManager &SourceMgr, SourceRange SR, 94 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument 98 RawText = getRawTextSlow(SourceMgr); in getRawText() 135 std::string getFormattedText(const SourceManager &SourceMgr, 167 StringRef getRawTextSlow(const SourceManager &SourceMgr) const; 195 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument 205 SourceManager &SourceMgr;
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Lex/ |
| H A D | PPConditionalDirectiveRecord.cpp | 20 : SourceMgr(SM) { in PPConditionalDirectiveRecord() 31 Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 35 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective() 40 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 55 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc() 61 Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc() 69 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc() 73 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
|
| H A D | ScratchBuffer.cpp | 25 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer() 42 SourceMgr.getSLocEntry(SourceMgr.getFileID(BufferStartLoc)) in getToken() 81 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() 82 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
| H A D | PreprocessingRecord.cpp | 55 PreprocessingRecord::PreprocessingRecord(SourceManager &SM) : SourceMgr(SM) {} in PreprocessingRecord() 111 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID() 124 FID, SourceMgr); in isEntityInFileID() 132 FID, SourceMgr); in isEntityInFileID() 146 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow() 213 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity() 244 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity() 251 PPEntityComp<&SourceRange::getBegin>(SourceMgr)); in findEndLocalPreprocessedEntity() 262 !SourceMgr.isBeforeInTranslationUnit( in addPreprocessedEntity() 272 !SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity() [all …]
|
| H A D | PPLexerChange.cpp | 83 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 85 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile() 90 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile() 91 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 119 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer() 268 SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()); in diagnoseMissingHeaderInUmbrellaDir() 404 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile() 417 SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) { in HandleEndOfFile() 421 SourceMgr.local_sloc_entry_size() - in HandleEndOfFile() 452 SourceMgr.getFileEntryForID(CurPPLexer->getFileID()))) in HandleEndOfFile() [all …]
|
| H A D | Preprocessor.cpp | 86 FileMgr(Headers.getFileMgr()), SourceMgr(SM), PCMCache(PCMCache), in Preprocessor() 87 ScratchBuf(new ScratchBuffer(SourceMgr)), HeaderInfo(Headers), in Preprocessor() 250 Loc.print(llvm::errs(), SourceMgr); in DumpLocation() 353 Def = I->second.findDirectiveAtLoc(Loc, SourceMgr); in getLastMacroWithSpelling() 417 SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()) == File) { in SetCodeCompletionPoint() 434 SourceMgr.overrideFileContents(File, std::move(NewBuffer)); in SetCodeCompletionPoint() 486 Loc = SourceMgr.createExpansionLoc(Loc, ExpansionLocStart, in CreateString() 531 FileID MainFileID = SourceMgr.getMainFileID(); in EnterMainSourceFile() 535 if (!SourceMgr.isLoadedFileID(MainFileID)) { in EnterMainSourceFile() 555 FileID FID = SourceMgr.createFileID(std::move(SB)); in EnterMainSourceFile() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/llvm-mc/ |
| H A D | Disassembler.cpp | 36 SourceMgr &SM, raw_ostream &Out, in PrintInsts() 54 SourceMgr::DK_Warning, in PrintInsts() 67 SourceMgr::DK_Warning, in PrintInsts() 103 SourceMgr &SM) { in ByteArrayFromString() 117 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString() 138 SourceMgr &SM, in disassemble() 179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 188 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 206 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Rewrite/ |
| H A D | Rewriter.cpp | 193 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText() 221 std::pair<FileID, unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID() 234 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() 250 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() 252 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText() 327 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText() 351 StringRef MB = SourceMgr->getBufferData(FID); in IncreaseIndentation() 353 unsigned parentLineNo = SourceMgr->getLineNumber(FID, parentOff) - 1; in IncreaseIndentation() 354 unsigned startLineNo = SourceMgr->getLineNumber(FID, StartOff) - 1; in IncreaseIndentation() 355 unsigned endLineNo = SourceMgr->getLineNumber(FID, EndOff) - 1; in IncreaseIndentation() [all …]
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Tooling/Refactoring/Rename/ |
| H A D | USRFindingAction.cpp | 195 bool FindSymbol(ASTContext &Context, const SourceManager &SourceMgr, in FindSymbol() argument 198 const FileID MainFileID = SourceMgr.getMainFileID(); in FindSymbol() 200 if (SymbolOffset >= SourceMgr.getFileIDSize(MainFileID)) { in FindSymbol() 206 << SourceMgr.getFileEntryForID(MainFileID)->getName() << SymbolOffset; in FindSymbol() 210 const SourceLocation Point = SourceMgr.getLocForStartOfFile(MainFileID) in FindSymbol() 218 FullSourceLoc FullLoc(Point, SourceMgr); in FindSymbol() 248 const SourceManager &SourceMgr = Context.getSourceManager(); in HandleTranslationUnit() local 250 if (!FindSymbol(Context, SourceMgr, Offset, "")) in HandleTranslationUnit() 254 if (!FindSymbol(Context, SourceMgr, 0, QualifiedName)) in HandleTranslationUnit()
|
| /freebsd-12.1/contrib/llvm/lib/AsmParser/ |
| H A D | Parser.cpp | 30 SourceMgr SM; in parseAssemblyInto() 62 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFile() 92 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFileWithIndex() 114 SourceMgr SM; in parseSummaryIndexAssemblyInto() 140 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseSummaryIndexAssemblyFile() 150 SourceMgr SM; in parseConstantValue() 167 SourceMgr SM; in parseType() 171 SourceMgr::DK_Error, "expected end of string"); in parseType() 179 SourceMgr SM; in parseTypeAtBeginning()
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Edit/ |
| H A D | EditedSource.cpp | 38 assert(SourceMgr.isMacroArgExpansion(Loc)); in deconstructMacroArgLoc() 40 SourceMgr.getImmediateExpansionRange(Loc).getBegin(); in deconstructMacroArgLoc() 42 SourceMgr.getImmediateExpansionRange(DefArgLoc).getBegin(); in deconstructMacroArgLoc() 44 while (SourceMgr.isMacroBodyExpansion(ExpansionLoc)) in deconstructMacroArgLoc() 46 SourceMgr.getImmediateExpansionRange(ExpansionLoc).getBegin(); in deconstructMacroArgLoc() 49 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc() 53 SourceMgr.getSpellingLoc(DefArgLoc)}; in deconstructMacroArgLoc() 82 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset() 120 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert() 446 applyRewrite(receiver, StrVec, CurOffs, CurLen, SourceMgr, LangOpts, in applyRewrites() [all …]
|
| H A D | Commit.cpp | 45 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit() 233 const SourceManager &SM = SourceMgr; in canInsert() 256 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken() 257 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken() 263 const SourceManager &SM = SourceMgr; in canInsertAfterToken() 273 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken() 299 const SourceManager &SM = SourceMgr; in canRemoveRange() 333 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText() 343 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion() 348 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
|
| /freebsd-12.1/contrib/llvm/tools/clang/lib/Frontend/ |
| H A D | VerifyDiagnosticConsumer.cpp | 708 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected() 712 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected() 715 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected() 728 SourceManager &SourceMgr, in PrintExpected() argument 739 OS << "\n File " << SourceMgr.getFilename(D->DiagnosticLoc); in PrintExpected() 746 << SourceMgr.getFilename(D->DirectiveLoc) << ':' in PrintExpected() 797 !IsFromSameFile(SourceMgr, D.DiagnosticLoc, II->first)) in CheckLists() 815 unsigned num = PrintExpected(Diags, SourceMgr, LeftOnly, Label); in CheckLists() 838 NumProblems += CheckLists(Diags, SourceMgr, "error", ED.Errors, in CheckResults() 848 NumProblems += CheckLists(Diags, SourceMgr, "remark", ED.Remarks, in CheckResults() [all …]
|