/external/clang/lib/Rewrite/ |
D | Rewriter.cpp | 213 FileID &FID) const { in getLocationOffsetAndFileID() 216 FID = V.first; in getLocationOffsetAndFileID() 223 RewriteBuffer &Rewriter::getEditBuffer(FileID FID) { in getEditBuffer() argument 225 RewriteBuffers.lower_bound(FID); in getEditBuffer() 226 if (I != RewriteBuffers.end() && I->first == FID) in getEditBuffer() 228 I = RewriteBuffers.insert(I, std::make_pair(FID, RewriteBuffer())); in getEditBuffer() 230 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() 241 FileID FID; in InsertText() local 242 unsigned StartOffs = getLocationOffsetAndFileID(Loc, FID); in InsertText() 246 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() [all …]
|
D | HTMLRewrite.cpp | 37 FileID FID = SM.getFileID(B); in HighlightRange() local 38 assert(SM.getFileID(E) == FID && "B/E not in the same file!"); in HighlightRange() 47 const char *BufferStart = SM.getBufferData(FID, &Invalid).data(); in HighlightRange() 51 HighlightRange(R.getEditBuffer(FID), BOffset, EOffset, in HighlightRange() 106 void html::EscapeText(Rewriter &R, FileID FID, in EscapeText() argument 109 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in EscapeText() 115 RewriteBuffer &RB = R.getEditBuffer(FID); in EscapeText() 226 void html::AddLineNumbers(Rewriter& R, FileID FID) { in AddLineNumbers() argument 228 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in AddLineNumbers() 232 RewriteBuffer &RB = R.getEditBuffer(FID); in AddLineNumbers() [all …]
|
D | TokenRewriter.cpp | 21 TokenRewriter::TokenRewriter(FileID FID, SourceManager &SM, in TokenRewriter() argument 26 const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID); in TokenRewriter() 27 Lexer RawLex(FID, FromFile, SM, LangOpts); in TokenRewriter()
|
/external/clang/include/clang/Basic/ |
D | SourceManager.h | 758 void setMainFileID(FileID FID) { in setMainFileID() argument 759 MainFileID = FID; in setMainFileID() 887 llvm::MemoryBuffer *getBuffer(FileID FID, SourceLocation Loc, 890 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid); 902 llvm::MemoryBuffer *getBuffer(FileID FID, bool *Invalid = nullptr) const { 904 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid); 918 const FileEntry *getFileEntryForID(FileID FID) const { in getFileEntryForID() argument 920 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid); in getFileEntryForID() 944 StringRef getBufferData(FileID FID, bool *Invalid = nullptr) const; 948 unsigned getNumCreatedFIDsForFileID(FileID FID) const { in getNumCreatedFIDsForFileID() argument [all …]
|
D | PlistSupport.h | 23 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in AddFID() local 24 FIDMap::iterator I = FIDs.find(FID); in AddFID() 27 FIDs[FID] = V.size(); in AddFID() 28 V.push_back(FID); in AddFID() 33 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in GetFID() local 34 FIDMap::const_iterator I = FIDs.find(FID); in GetFID()
|
D | SourceManagerInternals.h | 104 void AddLineNote(FileID FID, unsigned Offset, 106 void AddLineNote(FileID FID, unsigned Offset, 114 const LineEntry *FindNearestLineEntry(FileID FID, unsigned Offset); 123 void AddEntry(FileID FID, const std::vector<LineEntry> &Entries);
|
/external/clang/lib/Frontend/Rewrite/ |
D | HTMLPrint.cpp | 67 FileID FID = R.getSourceMgr().getMainFileID(); in HandleTranslationUnit() local 68 const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FID); in HandleTranslationUnit() 76 Name = R.getSourceMgr().getBuffer(FID)->getBufferIdentifier(); in HandleTranslationUnit() 78 html::AddLineNumbers(R, FID); in HandleTranslationUnit() 79 html::AddHeaderFooterInternalBuiltinCSS(R, FID, Name); in HandleTranslationUnit() 85 if (SyntaxHighlight) html::SyntaxHighlight(R, FID, PP); in HandleTranslationUnit() 86 if (HighlightMacros) html::HighlightMacros(R, FID, PP); in HandleTranslationUnit() 87 html::EscapeText(R, FID, false, true); in HandleTranslationUnit() 90 const RewriteBuffer &RewriteBuf = R.getEditBuffer(FID); in HandleTranslationUnit()
|
/external/clang/include/clang/Edit/ |
D | FileOffset.h | 20 FileID FID; variable 24 FileOffset(FileID fid, unsigned offs) : FID(fid), Offs(offs) { } in FileOffset() 26 bool isInvalid() const { return FID.isInvalid(); } in isInvalid() 28 FileID getFID() const { return FID; } in getFID() 38 return LHS.FID == RHS.FID && LHS.Offs == RHS.Offs; 44 return std::tie(LHS.FID, LHS.Offs) < std::tie(RHS.FID, RHS.Offs);
|
/external/clang/lib/Basic/ |
D | SourceManager.cpp | 190 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset, in AddLineNote() argument 192 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote() 221 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset, in AddLineNote() argument 227 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote() 244 FindNearestLineEntry(FID, Entries.back().IncludeOffset)) in AddLineNote() 255 const LineEntry *LineTableInfo::FindNearestLineEntry(FileID FID, in FindNearestLineEntry() argument 257 const std::vector<LineEntry> &Entries = LineEntries[FID]; in FindNearestLineEntry() 274 void LineTableInfo::AddEntry(FileID FID, in AddEntry() argument 276 LineEntries[FID] = Entries; in AddEntry() 517 FileID SourceManager::getPreviousFileID(FileID FID) const { in getPreviousFileID() [all …]
|
/external/clang/include/clang/Rewrite/Core/ |
D | HTMLRewrite.h | 53 void EscapeText(Rewriter& R, FileID FID, 63 void AddLineNumbers(Rewriter& R, FileID FID); 65 void AddHeaderFooterInternalBuiltinCSS(Rewriter& R, FileID FID, 70 void SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP); 76 void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP);
|
D | Rewriter.h | 166 RewriteBuffer &getEditBuffer(FileID FID); 170 const RewriteBuffer *getRewriteBufferFor(FileID FID) const { in getRewriteBufferFor() argument 172 RewriteBuffers.find(FID); in getRewriteBufferFor() 190 unsigned getLocationOffsetAndFileID(SourceLocation Loc, FileID &FID) const;
|
/external/clang/tools/libclang/ |
D | CIndexHigh.cpp | 48 FileID FID; member 56 FindFileIdRefVisitData(CXTranslationUnit TU, FileID FID, in FindFileIdRefVisitData() 59 : TU(TU), FID(FID), SelectorIdIdx(selectorIdIdx), visitor(visitor) { in FindFileIdRefVisitData() 199 if (LocInfo.first != data->FID) in findFileIdRefVisit() 221 FileID FID = SM.translateFile(File); in findIdRefsInFile() local 226 FindFileIdRefVisitData data(TU, FID, Dcl, in findIdRefsInFile() 235 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findIdRefsInFile() 319 FileID FID = SM.translateFile(File); in findMacroRefsInFile() local 330 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findMacroRefsInFile() 391 FileID FID = SM.translateFile(File); in findIncludesInFile() local [all …]
|
D | CXSourceLocation.cpp | 338 FileID FID = LocInfo.first; in clang_getSpellingLocation() local 341 if (FID.isInvalid()) in clang_getSpellingLocation() 345 *file = const_cast<FileEntry *>(SM.getFileEntryForID(FID)); in clang_getSpellingLocation() 347 *line = SM.getLineNumber(FID, FileOffset); in clang_getSpellingLocation() 349 *column = SM.getColumnNumber(FID, FileOffset); in clang_getSpellingLocation() 375 FileID FID = LocInfo.first; in clang_getFileLocation() local 378 if (FID.isInvalid()) in clang_getFileLocation() 382 *file = const_cast<FileEntry *>(SM.getFileEntryForID(FID)); in clang_getFileLocation() 384 *line = SM.getLineNumber(FID, FileOffset); in clang_getFileLocation() 386 *column = SM.getColumnNumber(FID, FileOffset); in clang_getFileLocation()
|
D | Indexing.cpp | 60 bool isParsed(SourceLocation Loc, FileID FID, const FileEntry *FE) { in isParsed() argument 187 bool isParsed(SourceLocation Loc, FileID FID, const FileEntry *FE) { 188 PPRegion region = getRegion(Loc, FID, FE); 208 PPRegion getRegion(SourceLocation Loc, FileID FID, const FileEntry *FE) { 224 if (RegionFID != FID) { 368 FileID FID; in shouldSkipFunctionBody() local 370 std::tie(FID, Offset) = SM.getDecomposedLoc(Loc); in shouldSkipFunctionBody() 372 if (SM.getMainFileID() == FID) in shouldSkipFunctionBody() 374 const FileEntry *FE = SM.getFileEntryForID(FID); in shouldSkipFunctionBody() 378 return SKCtrl->isParsed(Loc, FID, FE); in shouldSkipFunctionBody()
|
/external/clang/lib/Frontend/ |
D | LogDiagnosticPrinter.cpp | 120 FileID FID = SM.getMainFileID(); in HandleDiagnostic() local 121 if (FID.isValid()) { in HandleDiagnostic() 122 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic() 149 FileID FID = SM.getFileID(Info.getLocation()); in HandleDiagnostic() local 150 if (FID.isValid()) { in HandleDiagnostic() 151 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic()
|
D | VerifyDiagnosticConsumer.cpp | 129 FileID FID = SrcManager->getFileID(Loc); in HandleDiagnostic() local 131 const FileEntry *FE = SrcManager->getFileEntryForID(FID); in HandleDiagnostic() 132 if (FE && CurrentPreprocessor && SrcManager->isLoadedFileID(FID)) { in HandleDiagnostic() 140 UpdateParsedFileStatus(*SrcManager, FID, PS); in HandleDiagnostic() 581 static bool findDirectives(SourceManager &SM, FileID FID, in findDirectives() argument 584 if (FID.isInvalid()) in findDirectives() 588 const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID); in findDirectives() 589 Lexer RawLex(FID, FromFile, SM, LangOpts); in findDirectives() 777 FileID FID, in UpdateParsedFileStatus() argument 783 if (FID.isInvalid()) in UpdateParsedFileStatus() [all …]
|
D | TextDiagnostic.cpp | 779 FileID FID = SM.getFileID(Loc); in emitDiagnosticLoc() local 780 if (FID.isValid()) { in emitDiagnosticLoc() 781 const FileEntry* FE = SM.getFileEntryForID(FID); in emitDiagnosticLoc() 908 unsigned LineNo, FileID FID, in highlightRange() argument 919 if (StartLineNo > LineNo || SM.getFileID(Begin) != FID) in highlightRange() 923 if (EndLineNo < LineNo || SM.getFileID(End) != FID) in highlightRange() 1080 FileID FID = LocInfo.first; in emitSnippetAndCaret() local 1085 const char *BufStart = SM.getBufferData(FID, &Invalid).data(); in emitSnippetAndCaret() 1089 unsigned LineNo = SM.getLineNumber(FID, FileOffset); in emitSnippetAndCaret() 1090 unsigned ColNo = SM.getColumnNumber(FID, FileOffset); in emitSnippetAndCaret() [all …]
|
D | ASTUnit.cpp | 2536 FileID FID = SrcMgr.translateFile(FE); in TranslateStoredDiagnostics() local 2537 SourceLocation FileLoc = SrcMgr.getLocForStartOfFile(FID); in TranslateStoredDiagnostics() 2586 FileID FID; in addFileLevelDecl() local 2588 std::tie(FID, Offset) = SM.getDecomposedLoc(FileLoc); in addFileLevelDecl() 2589 if (FID.isInvalid()) in addFileLevelDecl() 2592 LocDeclsTy *&Decls = FileDecls[FID]; in addFileLevelDecl() 2709 FileID FID; in isInPreambleFileID() local 2711 FID = SourceMgr->getPreambleFileID(); in isInPreambleFileID() 2713 if (Loc.isInvalid() || FID.isInvalid()) in isInPreambleFileID() 2716 return SourceMgr->isInFileID(Loc, FID); in isInPreambleFileID() [all …]
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | HTMLDiagnostics.cpp | 128 FileID FID = in ReportDiag() local 130 assert(FID.isValid()); in ReportDiag() 161 HandlePiece(R, FID, **I, n, max); in ReportDiag() 166 html::EscapeText(R, FID); in ReportDiag() 167 html::AddLineNumbers(R, FID); in ReportDiag() 173 html::SyntaxHighlight(R, FID, PP); in ReportDiag() 174 html::HighlightMacros(R, FID, PP); in ReportDiag() 178 const FileEntry* Entry = SMgr.getFileEntryForID(FID); in ReportDiag() 224 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag() 275 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag() [all …]
|
/external/clang/lib/Lex/ |
D | PreprocessingRecord.cpp | 67 static bool isPreprocessedEntityIfInFileID(PreprocessedEntity *PPE, FileID FID, in isPreprocessedEntityIfInFileID() argument 69 assert(FID.isValid()); in isPreprocessedEntityIfInFileID() 77 return SM.isInFileID(SM.getFileLoc(Loc), FID); in isPreprocessedEntityIfInFileID() 87 bool PreprocessingRecord::isEntityInFileID(iterator PPEI, FileID FID) { in isEntityInFileID() argument 88 if (FID.isInvalid()) in isEntityInFileID() 100 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID() 105 ExternalSource->isPreprocessedEntityInFileID(LoadedIndex, FID); in isEntityInFileID() 113 FID, SourceMgr); in isEntityInFileID() 121 FID, SourceMgr); in isEntityInFileID()
|
D | PPLexerChange.cpp | 72 bool Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir, in EnterSourceFile() argument 81 if (PTHLexer *PL = PTH->CreateLexer(FID)) { in EnterSourceFile() 90 getSourceManager().getBuffer(FID, Loc, &Invalid); in EnterSourceFile() 92 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 99 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile() 100 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 105 EnterSourceFileWithLexer(new Lexer(FID, InputFile, *this), CurDir); in EnterSourceFile() 152 FileID FID = CurPPLexer->getFileID(); in EnterSourceFileWithPTH() local 153 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
|
D | ScratchBuffer.cpp | 72 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() local 73 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
D | PTHLexer.cpp | 37 PTHLexer::PTHLexer(Preprocessor &PP, FileID FID, const unsigned char *D, in PTHLexer() argument 39 : PreprocessorLexer(&PP, FID), TokBuf(D), CurPtr(D), LastHashTokPtr(nullptr), in PTHLexer() 42 FileStartLoc = PP.getSourceManager().getLocForStartOfFile(FID); in PTHLexer() 595 PTHLexer *PTHManager::CreateLexer(FileID FID) { in CreateLexer() argument 596 const FileEntry *FE = PP->getSourceManager().getFileEntryForID(FID); in CreateLexer() 622 return new PTHLexer(*PP, FID, data, ppcond, *this); in CreateLexer()
|
/external/clang/include/clang/Lex/ |
D | PreprocessorLexer.h | 33 const FileID FID; variable 156 return FID; in getFileID()
|
/external/clang/lib/ARCMigrate/ |
D | PlistReporter.cpp | 75 for (FileID FID : Fids) in writeARCDiagsToPlist() local 76 EmitString(o << " ", SM.getFileEntryForID(FID)->getName()) << '\n'; in writeARCDiagsToPlist()
|