Home
last modified time | relevance | path

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

1234567

/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/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 …]
DPPCallbacksTest.cpp117 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) { in PPCallbacksTest()
127 SourceManager SourceMgr; member in __anon5d7da8300111::PPCallbacksTest
149 const char* B = SourceMgr.getCharacterData(Range.getBegin()); in GetSourceString()
150 const char* E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceString()
161 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in InclusionDirectiveFilenameRange()
166 HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts, in InclusionDirectiveFilenameRange()
171 Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveFilenameRange()
199 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(SourceBuf))); in PragmaOpenCLExtensionCall()
202 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, in PragmaOpenCLExtensionCall()
205 Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr, in PragmaOpenCLExtensionCall()
[all …]
DPPConditionalDirectiveRecordTest.cpp36 SourceMgr(Diags, FileMgr), in PPConditionalDirectiveRecordTest()
47 SourceManager SourceMgr; member in __anondd7146620111::PPConditionalDirectiveRecordTest
93 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in TEST_F()
96 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
98 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
104 PPRec = new PPConditionalDirectiveRecord(SourceMgr); in TEST_F()
/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 …]
DYAMLParserTest.cpp33 SourceMgr SM; in ExpectParseError()
42 SourceMgr SM; in ExpectParseSuccess()
160 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 …]
/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-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/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/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/swiftshader/third_party/LLVM/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
34 class SourceMgr {
64 SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT
65 void operator=(const SourceMgr&); // DO NOT IMPLEMENT
67 SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {} in SourceMgr() function
68 ~SourceMgr();
157 const SourceMgr *SM;
173 SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN,
180 const SourceMgr *getSourceMgr() const { return SM; } in getSourceMgr()
/external/llvm/lib/Support/
DSourceMgr.cpp39 SourceMgr::~SourceMgr() { in ~SourceMgr()
45 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
66 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
77 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
121 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
135 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage()
198 void SourceMgr::PrintMessage(raw_ostream &OS, const SMDiagnostic &Diagnostic, in PrintMessage()
215 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage()
216 SourceMgr::DiagKind Kind, in PrintMessage()
222 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage()
[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
DAffectedRangeManager.h28 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument
30 : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {} in AffectedRangeManager()
60 const SourceManager &SourceMgr; variable
/external/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()
128 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment()
132 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment()
151 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
158 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
159 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
169 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
279 !SourceMgr.isBeforeInTranslationUnit(Comments.back()->getLocStart(), in addComment()
316 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[all …]
/external/llvm/tools/llvm-mc/
DDisassembler.cpp36 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()
/external/clang/lib/Lex/
DPPConditionalDirectiveRecord.cpp20 : 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()
DPreprocessingRecord.cpp42 : SourceMgr(SM), in PreprocessingRecord()
100 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
113 FID, SourceMgr); in isEntityInFileID()
121 FID, SourceMgr); in isEntityInFileID()
129 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow()
135 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow()
161 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange()
202 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity()
219 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity()
233 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity()
[all …]
DPPLexerChange.cpp92 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
94 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile()
99 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile()
100 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
128 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer()
153 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
155 SourceMgr.getFileCharacteristic(EnterLoc); in EnterSourceFileWithPTH()
375 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile()
392 SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) { in HandleEndOfFile()
396 SourceMgr.local_sloc_entry_size() - in HandleEndOfFile()
[all …]
/external/clang/include/clang/AST/
DRawCommentList.h43 RawComment(const SourceManager &SourceMgr, SourceRange SR,
101 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument
105 RawText = getRawTextSlow(SourceMgr); in getRawText()
156 StringRef getRawTextSlow(const SourceManager &SourceMgr) const;
184 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument
193 SourceManager &SourceMgr;
/external/clang/lib/Rewrite/
DRewriter.cpp152 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
187 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
191 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
201 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
215 std::pair<FileID,unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
230 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
246 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
248 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
250 Content = SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
323 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/external/swiftshader/third_party/LLVM/lib/Support/
DSourceMgr.cpp37 SourceMgr::~SourceMgr() { in ~SourceMgr()
51 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
72 int SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
84 unsigned SourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const { in FindLineNumber()
124 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
143 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, const Twine &Msg, in GetMessage()
181 void SourceMgr::PrintMessage(SMLoc Loc, const Twine &Msg, in PrintMessage()
/external/clang/lib/Frontend/
DVerifyDiagnosticConsumer.cpp614 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument
623 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected()
627 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected()
628 SourceMgr->getFileID(I->first))) in PrintUnexpected()
630 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected()
643 SourceManager &SourceMgr, in PrintExpected() argument
652 OS << "\n File " << SourceMgr.getFilename(D.DiagnosticLoc); in PrintExpected()
656 OS << " Line " << SourceMgr.getPresumedLineNumber(D.DiagnosticLoc); in PrintExpected()
659 << SourceMgr.getFilename(D.DirectiveLoc) << ':' in PrintExpected()
660 << SourceMgr.getPresumedLineNumber(D.DirectiveLoc) << ')'; in PrintExpected()
[all …]
/external/llvm/lib/AsmParser/
DParser.cpp27 SourceMgr SM; in parseAssemblyInto()
54 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFile()
72 SourceMgr SM; in parseConstantValue()
89 SourceMgr SM; in parseType()
93 SourceMgr::DK_Error, "expected end of string"); in parseType()
101 SourceMgr SM; in parseTypeAtBeginning()
/external/clang/lib/Edit/
DCommit.cpp39 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit()
227 const SourceManager &SM = SourceMgr; in canInsert()
251 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken()
252 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken()
258 const SourceManager &SM = SourceMgr; in canInsertAfterToken()
269 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken()
297 const SourceManager &SM = SourceMgr; in canRemoveRange()
331 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText()
341 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
345 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()

1234567