Home
last modified time | relevance | path

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

123456

/external/clang/unittests/Basic/
DSourceManagerTest.cpp38 SourceMgr(Diags, FileMgr), in SourceManagerTest()
48 SourceManager SourceMgr; member in __anonc0f8f66c0111::SourceManagerTest
78 FileID mainFileID = SourceMgr.createFileID(buf); in TEST_F()
79 SourceMgr.setMainFileID(mainFileID); in TEST_F()
82 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
84 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
110 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1); in TEST_F()
111 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6); in TEST_F()
119 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc)); in TEST_F()
120 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc)); in TEST_F()
[all …]
/external/llvm/unittests/Support/
DSourceMgrTest.cpp21 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_Note, "message", None, None); in TEST_F()
81 printMessage(getLoc(6), SourceMgr::DK_Error, "message", None, None); in TEST_F()
91 printMessage(getLoc(7), SourceMgr::DK_Error, "message", None, None); in TEST_F()
101 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 3), None); in TEST_F()
111 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(3, 3), None); in TEST_F()
121 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 7), None); in TEST_F()
[all …]
DYAMLParserTest.cpp34 SourceMgr SM; in ExpectParseError()
43 SourceMgr SM; in ExpectParseSuccess()
148 SourceMgr SM; in ExpectCanParseString()
185 SourceMgr SM; in TEST()
193 SourceMgr SM; in TEST()
206 SourceMgr SM; in TEST()
/external/clang/unittests/Lex/
DLexerTest.cpp56 SourceMgr(Diags, FileMgr), in LexerTest()
66 SourceMgr.setMainFileID(SourceMgr.createFileID(buf)); in CheckLex()
69 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in CheckLex()
71 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in CheckLex()
99 SourceMgr, LangOpts, &Invalid); in getSourceText()
109 SourceManager SourceMgr; member in __anon3f68e8070111::LexerTest
292 macroPair = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F()
296 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
298 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
299 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
[all …]
DPPCallbacksTest.cpp122 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) { in PPCallbacksTest()
132 SourceManager SourceMgr; member in __anon5fd522070111::PPCallbacksTest
153 const char* B = SourceMgr.getCharacterData(Range.getBegin()); in GetSourceString()
154 const char* E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceString()
164 SourceMgr.setMainFileID(SourceMgr.createFileID(Buf)); in InclusionDirectiveFilenameRange()
169 HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts, in InclusionDirectiveFilenameRange()
174 Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveFilenameRange()
201 SourceMgr.setMainFileID(SourceMgr.createFileID(sourceBuf)); in PragmaOpenCLExtensionCall()
204 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, in PragmaOpenCLExtensionCall()
207 Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr, in PragmaOpenCLExtensionCall()
[all …]
DPPConditionalDirectiveRecordTest.cpp37 SourceMgr(Diags, FileMgr), in PPConditionalDirectiveRecordTest()
48 SourceManager SourceMgr; member in __anon236089190111::PPConditionalDirectiveRecordTest
94 SourceMgr.setMainFileID(SourceMgr.createFileID(buf)); in TEST_F()
97 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
99 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
105 PPRec = new PPConditionalDirectiveRecord(SourceMgr); in TEST_F()
/external/llvm/lib/TableGen/
DError.cpp22 SourceMgr SrcMgr;
25 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
29 if (Kind == SourceMgr::DK_Error) in PrintMessage()
37 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
42 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
46 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
54 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
58 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/llvm/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
35 class SourceMgr {
71 SourceMgr(const SourceMgr&) LLVM_DELETED_FUNCTION;
72 void operator=(const SourceMgr&) LLVM_DELETED_FUNCTION;
74 SourceMgr() in SourceMgr() function
76 ~SourceMgr();
228 const SourceMgr *SM;
232 SourceMgr::DiagKind Kind;
240 : SM(nullptr), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
242 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/llvm/utils/FileCheck/
DFileCheck.cpp115 SourceMgr &SM,
129 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
138 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
156 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
162 SourceMgr &SM, in ParsePattern()
174 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
201 SourceMgr::DK_Error, in ParsePattern()
233 SourceMgr::DK_Error, in ParsePattern()
246 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
259 SourceMgr::DK_Error, in ParsePattern()
[all …]
/external/clang/lib/Format/
DWhitespaceManager.h40 WhitespaceManager(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;
194 SourceManager &SourceMgr; variable
DWhitespaceManager.cpp23 return SourceMgr.isBeforeInTranslationUnit( in operator ()()
92 std::sort(Changes.begin(), Changes.end(), Change::IsBeforeInFile(SourceMgr)); in generateReplacements()
105 SourceMgr.getFileOffset(Changes[i].OriginalWhitespaceRange.getBegin()); in calculateLineBreakInformation()
106 unsigned PreviousOriginalWhitespaceEnd = SourceMgr.getFileOffset( in calculateLineBreakInformation()
171 (SourceMgr.getSpellingColumnNumber( in alignTrailingComments()
173 SourceMgr.getSpellingColumnNumber( in alignTrailingComments()
282 unsigned WhitespaceLength = SourceMgr.getFileOffset(Range.getEnd()) - in storeReplacement()
283 SourceMgr.getFileOffset(Range.getBegin()); in storeReplacement()
285 if (StringRef(SourceMgr.getCharacterData(Range.getBegin()), in storeReplacement()
289 SourceMgr, CharSourceRange::getCharRange(Range), Text)); in storeReplacement()
/external/clang/lib/Lex/
DPPLexerChange.cpp91 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
93 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile()
98 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile()
99 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
127 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer()
152 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
154 SourceMgr.getFileCharacteristic(EnterLoc); in EnterSourceFileWithPTH()
285 SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) { in HandleEndOfFile()
345 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile()
362 SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) { in HandleEndOfFile()
[all …]
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()
102 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
115 FID, SourceMgr); in isEntityInFileID()
123 FID, SourceMgr); in isEntityInFileID()
131 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow()
137 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow()
163 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange()
204 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity()
221 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity()
235 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity()
[all …]
DScratchBuffer.cpp25 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer()
69 FileID FID = SourceMgr.createFileID(Buf); in AllocScratchBuffer()
70 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
/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/llvm/lib/Support/
DSourceMgr.cpp41 SourceMgr::~SourceMgr() { in ~SourceMgr()
52 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
73 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
84 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
128 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
142 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage()
205 void SourceMgr::PrintMessage(raw_ostream &OS, const SMDiagnostic &Diagnostic, in PrintMessage()
222 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage()
223 SourceMgr::DiagKind Kind, in PrintMessage()
229 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage()
[all …]
/external/llvm/tools/llvm-mc/
DDisassembler.cpp55 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
74 SourceMgr::DK_Warning, in PrintInsts()
87 SourceMgr::DK_Warning, in PrintInsts()
129 SourceMgr &SM) { in ByteArrayFromString()
143 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
162 SourceMgr &SM, in disassemble()
202 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
211 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
229 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/external/clang/lib/AST/
DRawCommentList.cpp67 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument
73 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment()
92 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
99 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
100 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
110 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
220 !SourceMgr.isBeforeInTranslationUnit(Comments.back()->getLocStart(), in addComment()
245 onlyWhitespaceBetween(SourceMgr, C1.getLocEnd(), C2.getLocStart(), in addComment()
248 *Comments.back() = RawComment(SourceMgr, MergedRange, true, in addComment()
262 BeforeThanCompare<RawComment>(SourceMgr)); in addDeserializedComments()
/external/clang/lib/Rewrite/Core/
DRewriter.cpp156 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
191 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
195 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
205 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
219 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()
254 Content = SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
327 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/external/clang/lib/Frontend/
DVerifyDiagnosticConsumer.cpp619 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument
628 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected()
632 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected()
633 SourceMgr->getFileID(I->first))) in PrintUnexpected()
635 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected()
647 static unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr, in PrintExpected() argument
656 OS << "\n File " << SourceMgr.getFilename(D.DiagnosticLoc); in PrintExpected()
660 OS << " Line " << SourceMgr.getPresumedLineNumber(D.DiagnosticLoc); in PrintExpected()
663 << SourceMgr.getFilename(D.DirectiveLoc) << ':' in PrintExpected()
664 << SourceMgr.getPresumedLineNumber(D.DirectiveLoc) << ')'; in PrintExpected()
[all …]
/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()
DEditedSource.cpp38 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset()
40 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in canInsertInOffset()
42 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in canInsertInOffset()
61 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert()
63 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in commitInsert()
65 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in commitInsert()
357 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites()
364 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites()
376 SourceLocation BLoc = SourceMgr.getLocForStartOfFile(BeginOffs.getFID()); in getSourceText()
382 SourceMgr, LangOpts, &Invalid); in getSourceText()
/external/llvm/tools/llvm-mcmarkup/
Dllvm-mcmarkup.cpp71 SourceMgr &SM;
73 MarkupParser(MarkupLexer &lex, SourceMgr &SrcMgr) : Lex(lex), SM(SrcMgr) {} in MarkupParser()
84 SM.PrintMessage(Loc, SourceMgr::DK_Error, Msg); in FatalError()
146 SourceMgr SrcMgr; in parseMCMarkup()
202 SrcMgr.PrintMessage(Tag.getLoc(), SourceMgr::DK_Error, in parseMCMarkup()
/external/clang/include/clang/Rewrite/Core/
DRewriter.h128 SourceManager *SourceMgr; variable
153 : SourceMgr(&SM), LangOpts(&LO) {} in Rewriter()
154 explicit Rewriter() : SourceMgr(nullptr), LangOpts(nullptr) {} in Rewriter()
157 SourceMgr = &SM; in setSourceMgr()
160 SourceManager &getSourceMgr() const { return *SourceMgr; } in getSourceMgr()

123456