| /llvm-project-15.0.7/clang/unittests/Basic/ |
| H A D | SourceManagerTest.cpp | 38 SourceMgr(Diags, FileMgr), in SourceManagerTest() 48 SourceManager SourceMgr; member in __anon0851c1e30111::SourceManagerTest 77 SourceMgr.setMainFileID(BuiltInFileID); in TEST_F() 79 SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()); in TEST_F() 92 SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()); in TEST_F() 105 SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()); in TEST_F() 128 SourceMgr.setMainFileID(mainFileID); in TEST_F() 182 SourceMgr.setMainFileID(MainFileID); in TEST_F() 247 SourceMgr.setMainFileID(MainFileID); in TEST_F() 330 SourceMgr.setMainFileID(mainFileID); in TEST_F() [all …]
|
| H A D | SarifTest.cpp | 50 SourceMgr(Diags, FileMgr) {} in SarifDocumentWriterTest() 57 SourceManager SourceMgr; member in __anon95b80a0c0111::SarifDocumentWriterTest 66 SourceMgr.overrideFileContents(SourceFile, std::move(SourceBuf)); in registerSource() 69 SourceMgr.setMainFileID(FID); in registerSource() 83 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() 98 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() 134 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() 153 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() 207 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() 231 SarifDocumentWriter Writer{SourceMgr}; in TEST_F() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | SourceMgrTest.cpp | 20 SourceMgr SM; 39 void printMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in printMessage() 51 printMessage(getLoc(4), SourceMgr::DK_Error, "message", None, None); in TEST_F() 71 printMessage(getLoc(4), SourceMgr::DK_Remark, "message", None, None); in TEST_F() 81 printMessage(getLoc(4), SourceMgr::DK_Note, "message", None, None); in TEST_F() 91 printMessage(getLoc(6), SourceMgr::DK_Error, "message", None, None); in TEST_F() 101 printMessage(getLoc(7), SourceMgr::DK_Error, "message", None, None); in TEST_F() 111 printMessage(getLoc(0), SourceMgr::DK_Error, "message", None, None); in TEST_F() 121 printMessage(getLoc(0), SourceMgr::DK_Error, "message", None, None); in TEST_F() 477 printMessage(getLoc(4), SourceMgr::DK_Error, "message", None, in TEST_F() [all …]
|
| H A D | YAMLParserTest.cpp | 32 SourceMgr SM; in ExpectParseError() 41 SourceMgr SM; in ExpectParseSuccess() 159 SourceMgr SM; in TEST() 190 SourceMgr SM; in ExpectCanParseString() 227 SourceMgr SM; in TEST() 235 SourceMgr SM; in TEST() 248 SourceMgr SM; in TEST() 263 SourceMgr SM; in TEST() 278 SourceMgr SM; in TEST() 293 SourceMgr SM; in TEST() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | SourceMgr.h | 31 class SourceMgr { 96 SourceMgr() = default; 97 SourceMgr(const SourceMgr &) = delete; 98 SourceMgr &operator=(const SourceMgr &) = delete; 99 SourceMgr(SourceMgr &&) = default; 100 SourceMgr &operator=(SourceMgr &&) = default; 101 ~SourceMgr() = default; 157 void takeSourceBuffersFrom(SourceMgr &SrcMgr, 282 const SourceMgr *SM = nullptr; 287 SourceMgr::DiagKind Kind = SourceMgr::DK_Error; [all …]
|
| /llvm-project-15.0.7/clang/unittests/Lex/ |
| H A D | LexerTest.cpp | 44 SourceMgr(Diags, FileMgr), in LexerTest() 55 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in CreatePP() 111 SourceManager SourceMgr; member in __anon134ba2be0111::LexerTest 322 SourceMgr, LangOpts); in TEST_F() 334 SourceMgr, LangOpts); in TEST_F() 346 SourceMgr, LangOpts); in TEST_F() 352 SourceMgr, LangOpts); in TEST_F() 421 SourceMgr, LangOpts); in TEST_F() 439 EXPECT_EQ(SourceMgr.getFileIDSize(SourceMgr.getFileID(helper1ArgLoc)), 8U); in TEST_F() 534 SourceMgr.getDecomposedExpansionLoc( in TEST_F() [all …]
|
| H A D | PPCallbacksTest.cpp | 147 SourceManager SourceMgr; member in __anonec3cc9fe0111::PPCallbacksTest 170 const char* E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceString() 191 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in InclusionDirectiveFilenameRange() 200 SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveFilenameRange() 210 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in InclusionDirectiveCharacteristicKind() 219 SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveCharacteristicKind() 249 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in DirectiveExprRange() 253 SourceMgr, HeaderInfo, ModLoader, in DirectiveExprRange() 277 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(SourceBuf))); in PragmaMarkCall() 310 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(SourceBuf))); in PragmaOpenCLExtensionCall() [all …]
|
| H A D | PPMemoryAllocationsTest.cpp | 32 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions) { in PPMemoryAllocationsTest() 41 SourceManager SourceMgr; member in __anon161746100111::PPMemoryAllocationsTest 66 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in TEST_F() 69 HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr, in TEST_F() 72 SourceMgr, HeaderInfo, ModLoader, in TEST_F()
|
| H A D | PPConditionalDirectiveRecordTest.cpp | 35 SourceMgr(Diags, FileMgr), in PPConditionalDirectiveRecordTest() 46 SourceManager SourceMgr; member in __anon1245fdf00111::PPConditionalDirectiveRecordTest 74 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in TEST_F() 77 HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr, in TEST_F() 80 SourceMgr, HeaderInfo, ModLoader, in TEST_F() 85 PPRec = new PPConditionalDirectiveRecord(SourceMgr); in TEST_F()
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | RawCommentList.cpp | 130 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment() 160 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow() 285 SourceMgr.getDecomposedLoc(RC.getBeginLoc()); in addComment() 317 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment() 322 RawComment(SourceMgr, MergedRange, CommentOpts, true); in addComment() 362 llvm::StringRef CommentText = getRawText(SourceMgr); in getFormattedText() 368 getFormattedLines(SourceMgr, Diags)) in getFormattedText() 378 RawComment::getFormattedLines(const SourceManager &SourceMgr, in getFormattedLines() argument 380 llvm::StringRef CommentText = getRawText(SourceMgr); in getFormattedLines() 429 llvm::StringRef TokText = L.getSpelling(Tok, SourceMgr); in getFormattedLines() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | IncludeInserter.cpp | 45 SourceMgr = &PP->getSourceManager(); in registerPreprocessor() 56 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in getOrCreate() 64 SourceMgr, FileID, in getOrCreate() 65 SourceMgr->getFilename(SourceMgr->getLocForStartOfFile(FileID)), Style); in getOrCreate() 87 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in createMainFileIncludeInsertion() 89 return createIncludeInsertion(SourceMgr->getMainFileID(), Header); in createMainFileIncludeInsertion() 95 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in addInclude() 97 FileID FileID = SourceMgr->getFileID(HashLocation); in addInclude()
|
| H A D | UsingInserter.cpp | 29 UsingInserter::UsingInserter(const SourceManager &SourceMgr) in UsingInserter() argument 30 : SourceMgr(SourceMgr) {} in UsingInserter() 43 Function->getBody()->getBeginLoc(), 0, SourceMgr, Context.getLangOpts()); in createUsingDeclaration() 46 if (SourceMgr.getFileID(InsertLoc) != SourceMgr.getMainFileID()) in createUsingDeclaration()
|
| /llvm-project-15.0.7/clang/lib/Format/ |
| H A D | QualifierAlignmentFixer.cpp | 106 static void replaceToken(const SourceManager &SourceMgr, in replaceToken() argument 118 static void removeToken(const SourceManager &SourceMgr, in removeToken() argument 123 replaceToken(SourceMgr, Fixes, Range, ""); in removeToken() 138 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierAfter() 151 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierBefore() 166 static void rotateTokens(const SourceManager &SourceMgr, in rotateTokens() argument 203 replaceToken(SourceMgr, Fixes, Range, NewText); in rotateTokens() 236 removeToken(SourceMgr, Fixes, Tok); in analyzeRight() 299 removeToken(SourceMgr, Fixes, Tok); in analyzeRight() 388 removeToken(SourceMgr, Fixes, Next); in analyzeLeft() [all …]
|
| H A D | UsingDeclarationsSorter.cpp | 116 const SourceManager &SourceMgr, tooling::Replacements *Fixes) { in endUsingDeclarationBlock() argument 159 StringRef Text(SourceMgr.getCharacterData(SortedBegin), in endUsingDeclarationBlock() 160 SourceMgr.getCharacterData(SortedEnd) - in endUsingDeclarationBlock() 161 SourceMgr.getCharacterData(SortedBegin)); in endUsingDeclarationBlock() 163 StringRef OldText(SourceMgr.getCharacterData(Begin), in endUsingDeclarationBlock() 164 SourceMgr.getCharacterData(End) - in endUsingDeclarationBlock() 165 SourceMgr.getCharacterData(Begin)); in endUsingDeclarationBlock() 187 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local 195 endUsingDeclarationBlock(&UsingDeclarations, SourceMgr, &Fixes); in analyze() 199 endUsingDeclarationBlock(&UsingDeclarations, SourceMgr, &Fixes); in analyze() [all …]
|
| /llvm-project-15.0.7/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() 50 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote() 92 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning() 96 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning() 104 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError() 108 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError() 114 PrintMessage(Rec->getLoc(), SourceMgr::DK_Error, Msg); in PrintError() [all …]
|
| /llvm-project-15.0.7/llvm/lib/FileCheck/ |
| H A D | FileCheckImpl.h | 193 getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat() 341 getImplicitFormat(const SourceMgr &SM) const override { in getImplicitFormat() 382 getImplicitFormat(const SourceMgr &SM) const override; 506 SourceMgr &SM); 724 FileCheckPatternContext *Context, const SourceMgr &SM); 762 void printFuzzyMatch(const SourceMgr &SM, StringRef Buffer, 798 const SourceMgr &SM); 835 const SourceMgr &SM); 857 const SourceMgr &SM); 896 bool CheckNot(const SourceMgr &SM, StringRef Buffer, [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | SourceMgr.cpp | 40 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile() 52 SourceMgr::OpenIncludeFile(const std::string &Filename, in OpenIncludeFile() 166 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer() 172 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer() 270 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage() 348 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage() 355 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage() 507 case SourceMgr::DK_Error: in print() 510 case SourceMgr::DK_Warning: in print() 513 case SourceMgr::DK_Note: in print() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/AST/ |
| H A D | RawCommentList.h | 47 RawComment(const SourceManager &SourceMgr, SourceRange SR, 98 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument 102 RawText = getRawTextSlow(SourceMgr); in getRawText() 139 std::string getFormattedText(const SourceManager &SourceMgr, 154 std::vector<CommentLine> getFormattedLines(const SourceManager &SourceMgr, 186 StringRef getRawTextSlow(const SourceManager &SourceMgr) const; 197 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument 213 SourceManager &SourceMgr;
|
| /llvm-project-15.0.7/llvm/tools/llvm-mca/ |
| H A D | CodeRegion.cpp | 19 CodeRegions::CodeRegions(llvm::SourceMgr &S) : SM(S), FoundErrors(false) { in CodeRegions() 47 SM.PrintMessage(Loc, SourceMgr::DK_Error, in beginRegion() 49 SM.PrintMessage(R.startLoc(), SourceMgr::DK_Note, in beginRegion() 55 SM.PrintMessage(Loc, SourceMgr::DK_Error, in beginRegion() 57 SM.PrintMessage(R.startLoc(), SourceMgr::DK_Note, in beginRegion() 97 SM.PrintMessage(Loc, SourceMgr::DK_Error, in endRegion() 100 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion() 103 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion()
|
| /llvm-project-15.0.7/clang/unittests/AST/ |
| H A D | CommentTextTest.cpp | 32 SourceManager& SourceMgr = FileSourceMgr.get(); in formatComment() local 36 FileID File = SourceMgr.getMainFileID(); in formatComment() 39 SourceMgr.getLocForStartOfFile(File).getLocWithOffset( in formatComment() 41 SourceMgr.getLocForEndOfFile(File)); in formatComment() 45 RawComment Comment(SourceMgr, CommentRange, EmptyOpts, /*Merged=*/true); in formatComment() 47 return Comment.getFormattedText(SourceMgr, Diags); in formatComment()
|
| /llvm-project-15.0.7/llvm/tools/llvm-mc/ |
| H A D | Disassembler.cpp | 36 SourceMgr &SM, raw_ostream &Out, in PrintInsts() 53 SourceMgr::DK_Warning, in PrintInsts() 66 SourceMgr::DK_Warning, in PrintInsts() 102 SourceMgr &SM) { in ByteArrayFromString() 116 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString() 134 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble() 174 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 183 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 201 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
|
| /llvm-project-15.0.7/llvm/tools/llvm-ml/ |
| H A D | Disassembler.cpp | 34 SourceMgr &SM, raw_ostream &Out, MCStreamer &Streamer, in PrintInsts() 50 SourceMgr::DK_Warning, "invalid instruction encoding"); in PrintInsts() 62 SourceMgr::DK_Warning, in PrintInsts() 96 SourceMgr &SM) { in ByteArrayFromString() 110 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString() 128 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble() 170 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 197 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
|
| /llvm-project-15.0.7/clang/lib/Lex/ |
| H A D | PPConditionalDirectiveRecord.cpp | 19 : SourceMgr(SM) { in PPConditionalDirectiveRecord() 29 CondDirectiveLocs, Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 33 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective() 38 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 53 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc() 58 CondDirectiveLocs, Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc() 66 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc() 70 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
|
| H A D | ScratchBuffer.cpp | 24 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer() 40 SourceMgr.getSLocEntry(SourceMgr.getFileID(BufferStartLoc)) in getToken() 80 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() 81 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
| /llvm-project-15.0.7/clang/lib/Rewrite/ |
| H A D | Rewriter.cpp | 203 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText() 235 std::pair<FileID, unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID() 248 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() 264 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() 266 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText() 268 &SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText() 341 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText() 365 StringRef MB = SourceMgr->getBufferData(FID); in IncreaseIndentation() 368 unsigned startLineNo = SourceMgr->getLineNumber(FID, StartOff) - 1; in IncreaseIndentation() 369 unsigned endLineNo = SourceMgr->getLineNumber(FID, EndOff) - 1; in IncreaseIndentation() [all …]
|