Home
last modified time | relevance | path

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

1234

/external/clang/unittests/Lex/
DLexerTest.cpp35 SourceMgr(Diags, FileMgr) { in LexerTest()
44 SourceManager SourceMgr; member in __anon85a605f40111::LexerTest
69 (void)SourceMgr.createMainFileIDForMemBuffer(buf); in TEST_F()
75 SourceMgr, HeaderInfo, ModLoader, in TEST_F()
107 macroPair = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F()
111 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
113 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
114 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
115 EXPECT_TRUE(Lexer::isAtEndOfMacroExpansion(rsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
119 CharSourceRange::getTokenRange(lsqrLoc, idLoc), SourceMgr, LangOpts); in TEST_F()
[all …]
DPreprocessingRecordTest.cpp36 SourceMgr(Diags, FileMgr) { in PreprocessingRecordTest()
45 SourceManager SourceMgr; member in __anonfb0de3770111::PreprocessingRecordTest
80 SourceMgr.createMainFileIDForMemBuffer(buf); in TEST_F()
86 SourceMgr, HeaderInfo, ModLoader, in TEST_F()
/external/clang/unittests/Basic/
DSourceManagerTest.cpp36 SourceMgr(Diags, FileMgr) { in SourceManagerTest()
45 SourceManager SourceMgr; member in __anonaed220990111::SourceManagerTest
64 FileID mainFileID = SourceMgr.createMainFileIDForMemBuffer(buf); in TEST_F()
70 SourceMgr, HeaderInfo, ModLoader, in TEST_F()
95 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1); in TEST_F()
96 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6); in TEST_F()
104 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc)); in TEST_F()
105 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc)); in TEST_F()
106 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(macroExpStartLoc, idLoc)); in TEST_F()
107 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, macroExpEndLoc)); in TEST_F()
[all …]
/external/llvm/include/llvm/Support/
DSourceMgr.h25 class SourceMgr; variable
32 class SourceMgr {
68 SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT
69 void operator=(const SourceMgr&); // DO NOT IMPLEMENT
71 SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {} in SourceMgr() function
72 ~SourceMgr();
159 const SourceMgr *SM;
163 SourceMgr::DiagKind Kind;
170 : SM(0), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
172 SMDiagnostic(const std::string &filename, SourceMgr::DiagKind Kind, in SMDiagnostic()
[all …]
DIRReader.h43 Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error, in getLazyIRModule()
64 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in getLazyIRFileModule()
84 Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error, in ParseIR()
102 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in ParseIRFile()
/external/llvm/utils/FileCheck/
DFileCheck.cpp82 bool ParsePattern(StringRef PatternStr, SourceMgr &SM);
95 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
100 bool AddRegExToRegEx(StringRef RegExStr, unsigned &CurParen, SourceMgr &SM);
110 bool Pattern::ParsePattern(StringRef PatternStr, SourceMgr &SM) { in ParsePattern()
120 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
148 SourceMgr::DK_Error, in ParsePattern()
178 SourceMgr::DK_Error, in ParsePattern()
191 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
200 SourceMgr::DK_Error, "invalid name in named regex"); in ParsePattern()
206 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
[all …]
/external/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, SourceMgr::DiagKind Kind, in GetMessage()
195 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage()
219 SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN, in SMDiagnostic()
220 int Line, int Col, SourceMgr::DiagKind Kind, in SMDiagnostic()
255 case SourceMgr::DK_Error: in print()
[all …]
/external/clang/lib/Lex/
DPreprocessingRecord.cpp42 : SourceMgr(SM), in PreprocessingRecord()
105 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
118 FID, SourceMgr); in isEntityInFileID()
124 FID, SourceMgr); in isEntityInFileID()
132 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow()
138 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow()
164 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange()
205 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity()
222 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity()
236 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity()
[all …]
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()
126 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer()
150 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
152 SourceMgr.getFileCharacteristic(EnterLoc); in EnterSourceFileWithPTH()
243 SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) in HandleEndOfFile()
265 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile()
282 SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) { in HandleEndOfFile()
[all …]
DModuleMap.cpp80 SourceMgr = new SourceManager(*Diags, FileMgr); in ModuleMap()
90 delete SourceMgr; in ~ModuleMap()
184 Dir = SourceMgr->getFileManager().getDirectory(DirName); in findModuleForHeader()
245 Dir = SourceMgr->getFileManager().getDirectory(DirName); in isHeaderInUnavailableModule()
299 FileManager &FileMgr = SourceMgr->getFileManager(); in inferFrameworkModule()
376 if (Module->DefinitionLoc.isInvalid() || !SourceMgr) in getContainingModuleMapFile()
379 return SourceMgr->getFileEntryForID( in getContainingModuleMapFile()
380 SourceMgr->getFileID(Module->DefinitionLoc)); in getContainingModuleMapFile()
496 SourceManager &SourceMgr; member in clang::ModuleMapParser
543 explicit ModuleMapParser(Lexer &L, SourceManager &SourceMgr, in ModuleMapParser() argument
[all …]
DScratchBuffer.cpp24 ScratchBuffer::ScratchBuffer(SourceManager &SM) : SourceMgr(SM), CurBuffer(0) { in ScratchBuffer()
68 FileID FID = SourceMgr.createFileIDForMemBuffer(Buf); in AllocScratchBuffer()
69 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
DPreprocessor.cpp60 SourceMgr(SM), HeaderInfo(Headers), TheModuleLoader(TheModuleLoader), in Preprocessor()
118 ScratchBuf = new ScratchBuffer(SourceMgr); in Initialize()
196 const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); in DumpToken()
207 Loc.dump(SourceMgr); in DumpLocation()
295 const MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File, &Invalid); in SetCodeCompletionPoint()
329 SourceMgr.overrideFileContents(File, NewBuffer); in SetCodeCompletionPoint()
375 Loc = SourceMgr.createExpansionLoc(Loc, ExpansionLocStart, in CreateString()
405 FileID MainFileID = SourceMgr.getMainFileID(); in EnterMainSourceFile()
409 if (!SourceMgr.isLoadedFileID(MainFileID)) { in EnterMainSourceFile()
421 if (const FileEntry *FE = SourceMgr.getFileEntryForID(MainFileID)) in EnterMainSourceFile()
[all …]
/external/llvm/lib/TableGen/
DError.cpp21 SourceMgr SrcMgr;
24 SrcMgr.PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
28 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
40 SrcMgr.PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
44 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/clang/lib/Rewrite/
DRewriter.cpp147 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
182 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
186 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
196 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
210 std::pair<FileID,unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
225 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
241 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
243 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
245 Content = SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
318 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/external/clang/lib/Frontend/
DVerifyDiagnosticConsumer.cpp375 static unsigned PrintProblem(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintProblem() argument
384 if (I->first.isInvalid() || !SourceMgr) in PrintProblem()
387 OS << "\n Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintProblem()
396 static unsigned PrintProblem(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintProblem() argument
406 if (D.Location.isInvalid() || !SourceMgr) in PrintProblem()
409 OS << "\n Line " << SourceMgr->getPresumedLineNumber(D.Location); in PrintProblem()
421 static unsigned CheckLists(DiagnosticsEngine &Diags, SourceManager &SourceMgr, in CheckLists() argument
431 unsigned LineNo1 = SourceMgr.getPresumedLineNumber(D.Location); in CheckLists()
437 unsigned LineNo2 = SourceMgr.getPresumedLineNumber(II->first); in CheckLists()
462 unsigned num = PrintProblem(Diags, &SourceMgr, LeftOnly, Label, true); in CheckLists()
[all …]
/external/llvm/tools/llvm-mc/
DDisassembler.h25 class SourceMgr; variable
36 SourceMgr &SM,
41 SourceMgr &SM,
DDisassembler.cpp57 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
75 SourceMgr::DK_Warning, in PrintInsts()
83 SourceMgr::DK_Warning, in PrintInsts()
98 SourceMgr &SM) { in ByteArrayFromString()
129 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
148 SourceMgr &SM, in disassemble()
202 SourceMgr &SM, in disassembleEnhanced()
/external/clang/lib/Edit/
DEditedSource.cpp37 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset()
39 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in canInsertInOffset()
41 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in canInsertInOffset()
60 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert()
62 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in commitInsert()
64 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in commitInsert()
288 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr); in applyRewrites()
295 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr); in applyRewrites()
307 SourceLocation BLoc = SourceMgr.getLocForStartOfFile(BeginOffs.getFID()); in getSourceText()
313 SourceMgr, LangOpts, &Invalid); in getSourceText()
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()
340 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
344 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
/external/clang/include/clang/Rewrite/
DRewriter.h126 SourceManager *SourceMgr; variable
150 : SourceMgr(&SM), LangOpts(&LO) {} in Rewriter()
151 explicit Rewriter() : SourceMgr(0), LangOpts(0) {} in Rewriter()
154 SourceMgr = &SM; in setSourceMgr()
157 SourceManager &getSourceMgr() const { return *SourceMgr; } in getSourceMgr()
/external/llvm/unittests/Support/
DYAMLParserTest.cpp22 SourceMgr SM; in ExpectParseError()
30 SourceMgr SM; in ExpectParseSuccess()
135 SourceMgr SM; in ExpectCanParseString()
172 SourceMgr SM; in TEST()
/external/clang/include/clang/Edit/
DEditedSource.h28 const SourceManager &SourceMgr; variable
49 : SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), in SourceMgr() function
52 const SourceManager &getSourceManager() const { return SourceMgr; } in getSourceManager()
/external/clang/include/clang/Frontend/
DCompilerInstance.h80 IntrusiveRefCntPtr<SourceManager> SourceMgr; variable
324 bool hasSourceManager() const { return SourceMgr != 0; } in hasSourceManager()
328 assert(SourceMgr && "Compiler instance has no source manager!"); in getSourceManager()
329 return *SourceMgr; in getSourceManager()
333 SourceMgr.resetWithoutRelease(); in resetAndLeakSourceManager()
652 SourceManager &SourceMgr,
/external/llvm/include/llvm/MC/MCParser/
DMCAsmParser.h27 class SourceMgr; variable
55 virtual SourceMgr &getSourceManager() = 0;
141 MCAsmParser *createMCAsmParser(SourceMgr &, MCContext &,
/external/clang/include/clang/Lex/
DPreprocessor.h68 SourceManager &SourceMgr; variable
371 SourceManager &getSourceManager() const { return SourceMgr; } in getSourceManager()
801 return Lexer::getSpelling(loc, buffer, SourceMgr, LangOpts, invalid);
812 return Lexer::getSpelling(Tok, SourceMgr, LangOpts, Invalid);
827 return Lexer::getSpelling(Tok, Buffer, SourceMgr, LangOpts, Invalid);
851 return *SourceMgr.getCharacterData(Tok.getLocation(), Invalid);
862 return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOpts()); in getImmediateMacroName()
888 return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
898 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts,
909 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd);
[all …]

1234