Home
last modified time | relevance | path

Searched refs:SourceMgr (Results 1 – 25 of 473) sorted by relevance

12345678910>>...19

/external/llvm-project/clang/unittests/Basic/
DSourceManagerTest.cpp38 SourceMgr(Diags, FileMgr), in SourceManagerTest()
48 SourceManager SourceMgr; member in __anon2461a5a30111::SourceManagerTest
60 FileID mainFileID = SourceMgr.createFileID(std::move(Buf)); in TEST_F()
61 SourceMgr.setMainFileID(mainFileID); in TEST_F()
64 HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr, in TEST_F()
67 SourceMgr, HeaderInfo, ModLoader, in TEST_F()
92 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1); in TEST_F()
93 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6); in TEST_F()
101 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc)); in TEST_F()
102 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc)); in TEST_F()
[all …]
/external/llvm-project/llvm/unittests/Support/
DSourceMgrTest.cpp20 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()
61 printMessage(getLoc(4), SourceMgr::DK_Warning, "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()
[all …]
/external/clang/unittests/Basic/
DSourceManagerTest.cpp37 SourceMgr(Diags, FileMgr), in SourceManagerTest()
47 SourceManager SourceMgr; member in __anonce5a69150111::SourceManagerTest
77 FileID mainFileID = SourceMgr.createFileID(std::move(Buf)); in TEST_F()
78 SourceMgr.setMainFileID(mainFileID); in TEST_F()
81 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
83 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
109 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1); in TEST_F()
110 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6); in TEST_F()
118 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc)); in TEST_F()
119 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc)); in TEST_F()
[all …]
/external/llvm/unittests/Support/
DSourceMgrTest.cpp21 SourceMgr SM;
40 void printMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in printMessage()
52 printMessage(getLoc(4), SourceMgr::DK_Error, "message", None, None); in TEST_F()
62 printMessage(getLoc(4), SourceMgr::DK_Warning, "message", None, None); in TEST_F()
72 printMessage(getLoc(4), SourceMgr::DK_Note, "message", None, None); in TEST_F()
82 printMessage(getLoc(6), SourceMgr::DK_Error, "message", None, None); in TEST_F()
92 printMessage(getLoc(7), SourceMgr::DK_Error, "message", None, None); in TEST_F()
102 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 3), None); in TEST_F()
112 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(3, 3), None); in TEST_F()
122 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 7), None); in TEST_F()
[all …]
/external/llvm-project/clang/unittests/Lex/
DLexerTest.cpp41 SourceMgr(Diags, FileMgr), in LexerTest()
52 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in CreatePP()
54 HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr, in CreatePP()
57 std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr, in CreatePP()
98 SourceMgr, LangOpts, &Invalid); in getSourceText()
108 SourceManager SourceMgr; member in __anon7ab7d67e0111::LexerTest
290 CharSourceRange macroRange = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F()
293 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
295 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
296 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
[all …]
DPPCallbacksTest.cpp123 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) { in PPCallbacksTest()
133 SourceManager SourceMgr; member in __anonca70cdbe0111::PPCallbacksTest
155 const char* B = SourceMgr.getCharacterData(Range.getBegin()); in GetSourceString()
156 const char* E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceString()
162 const char *B = SourceMgr.getCharacterData(Range.getBegin()); in GetSourceStringToEnd()
163 const char *E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceStringToEnd()
167 E - B + Lexer::MeasureTokenLength(Range.getEnd(), SourceMgr, LangOpts)); in GetSourceStringToEnd()
177 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in InclusionDirectiveFilenameRange()
181 HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr, in InclusionDirectiveFilenameRange()
186 SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveFilenameRange()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DSourceMgr.h41 class SourceMgr {
106 SourceMgr() = default;
107 SourceMgr(const SourceMgr &) = delete;
108 SourceMgr &operator=(const SourceMgr &) = delete;
109 SourceMgr(SourceMgr &&) = default;
110 SourceMgr &operator=(SourceMgr &&) = default;
111 ~SourceMgr() = default;
262 const SourceMgr *SM = nullptr;
267 SourceMgr::DiagKind Kind = SourceMgr::DK_Error;
276 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DSourceMgr.h31 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;
252 const SourceMgr *SM = nullptr;
257 SourceMgr::DiagKind Kind = SourceMgr::DK_Error;
266 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/clang/unittests/Lex/
DLexerTest.cpp54 SourceMgr(Diags, FileMgr), in LexerTest()
64 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in Lex()
67 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in Lex()
69 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in Lex()
103 SourceMgr, LangOpts, &Invalid); in getSourceText()
113 SourceManager SourceMgr; member in __anone91643700111::LexerTest
296 macroPair = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F()
300 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
302 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
303 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
[all …]
/external/llvm/utils/FileCheck/
DFileCheck.cpp141 SourceMgr &SM,
155 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
164 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
182 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
188 SourceMgr &SM, in ParsePattern()
202 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
235 SourceMgr::DK_Error, in ParsePattern()
267 SourceMgr::DK_Error, in ParsePattern()
280 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
293 SourceMgr::DK_Error, in ParsePattern()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/TableGen/
DError.cpp23 SourceMgr SrcMgr;
26 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
30 if (Kind == SourceMgr::DK_Error) in PrintMessage()
38 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
45 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote()
49 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
53 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
59 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
63 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DFileCheckImpl.h287 SourceMgr &SM);
334 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg) { in get()
336 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg)); in get()
339 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { in get()
454 const SourceMgr &SM);
468 FileCheckPatternContext *Context, const SourceMgr &SM);
476 bool parsePattern(StringRef PatternStr, StringRef Prefix, SourceMgr &SM,
491 const SourceMgr &SM) const;
494 void printSubstitutions(const SourceMgr &SM, StringRef Buffer,
496 void printFuzzyMatch(const SourceMgr &SM, StringRef Buffer,
[all …]
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
35 class SourceMgr {
71 SourceMgr(const SourceMgr&) = delete;
72 void operator=(const SourceMgr&) = delete;
74 SourceMgr() in SourceMgr() function
76 ~SourceMgr();
229 const SourceMgr *SM;
233 SourceMgr::DiagKind Kind;
241 : SM(nullptr), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
243 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/llvm-project/llvm/lib/TableGen/
DError.cpp24 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 …]
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DIncludeInserter.cpp44 SourceMgr = &PP->getSourceManager(); in registerPreprocessor()
55 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in getOrCreate()
63 SourceMgr, FileID, in getOrCreate()
64 SourceMgr->getFilename(SourceMgr->getLocForStartOfFile(FileID)), Style); in getOrCreate()
84 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in createMainFileIncludeInsertion()
86 return createIncludeInsertion(SourceMgr->getMainFileID(), Header); in createMainFileIncludeInsertion()
92 assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " in addInclude()
94 FileID FileID = SourceMgr->getFileID(HashLocation); in addInclude()
/external/llvm/lib/TableGen/
DError.cpp23 SourceMgr SrcMgr;
26 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
30 if (Kind == SourceMgr::DK_Error) in PrintMessage()
38 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
43 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
47 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
55 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
59 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/llvm/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
35 class SourceMgr {
76 SourceMgr(const SourceMgr&) = delete;
77 void operator=(const SourceMgr&) = delete;
79 SourceMgr() in SourceMgr() function
81 ~SourceMgr();
234 const SourceMgr *SM;
238 SourceMgr::DiagKind Kind;
246 : SM(nullptr), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
248 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/llvm-project/llvm/lib/FileCheck/
DFileCheckImpl.h100 const SourceMgr &SM) const;
189 getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
338 getImplicitFormat(const SourceMgr &SM) const override { in getImplicitFormat()
379 getImplicitFormat(const SourceMgr &SM) const override;
503 SourceMgr &SM);
549 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg) { in get()
551 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg)); in get()
554 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { in get()
669 const SourceMgr &SM);
683 FileCheckPatternContext *Context, const SourceMgr &SM);
[all …]
/external/llvm-project/clang/lib/Format/
DUsingDeclarationsSorter.cpp116 const SourceManager &SourceMgr, tooling::Replacements *Fixes) { in endUsingDeclarationBlock() argument
145 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, "")); in endUsingDeclarationBlock()
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()
169 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, Text)); in endUsingDeclarationBlock()
187 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local
[all …]
DWhitespaceManager.h40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager()
93 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile()
97 const SourceManager &SourceMgr;
226 const SourceManager &SourceMgr; variable
/external/llvm-project/llvm/lib/Support/
DSourceMgr.cpp40 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
61 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
92 unsigned SourceMgr::SrcBuffer::getLineNumberSpecialized(const char *Ptr) const { in getLineNumberSpecialized()
110 unsigned SourceMgr::SrcBuffer::getLineNumber(const char *Ptr) const { in getLineNumber()
123 const char *SourceMgr::SrcBuffer::getPointerForLineNumberSpecialized( in getPointerForLineNumberSpecialized()
146 SourceMgr::SrcBuffer::getPointerForLineNumber(unsigned LineNo) const { in getPointerForLineNumber()
158 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer()
164 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer()
180 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
204 std::string SourceMgr::getFormattedLocationNoOffset(SMLoc Loc, in getFormattedLocationNoOffset()
[all …]
/external/clang/lib/Format/
DWhitespaceManager.h40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager()
90 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile()
94 const SourceManager &SourceMgr;
206 const SourceManager &SourceMgr; variable
/external/llvm-project/clang/lib/AST/
DRawCommentList.cpp109 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()
152 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
159 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
160 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
170 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
284 SourceMgr.getDecomposedLoc(RC.getBeginLoc()); in addComment()
316 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[all …]
/external/llvm-project/clang/include/clang/AST/
DRawCommentList.h47 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,
171 StringRef getRawTextSlow(const SourceManager &SourceMgr) const;
182 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument
198 SourceManager &SourceMgr;
/external/llvm-project/llvm/tools/llvm-mca/
DCodeRegion.cpp19 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()
98 SM.PrintMessage(Loc, SourceMgr::DK_Error, in endRegion()
101 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion()
104 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion()

12345678910>>...19