/external/clang/unittests/Basic/ |
D | SourceManagerTest.cpp | 38 SourceMgr(Diags, FileMgr), in SourceManagerTest() 48 SourceManager SourceMgr; member in __anon1dc26fe10111::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/ |
D | SourceMgrTest.cpp | 21 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 …]
|
D | YAMLParserTest.cpp | 34 SourceMgr SM; in ExpectParseError() 43 SourceMgr SM; in ExpectParseSuccess() 161 SourceMgr SM; in TEST() 191 SourceMgr SM; in ExpectCanParseString() 228 SourceMgr SM; in TEST() 236 SourceMgr SM; in TEST() 249 SourceMgr SM; in TEST()
|
/external/clang/unittests/Lex/ |
D | LexerTest.cpp | 55 SourceMgr(Diags, FileMgr), in LexerTest() 65 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in CheckLex() 68 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in CheckLex() 70 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in CheckLex() 98 SourceMgr, LangOpts, &Invalid); in getSourceText() 108 SourceManager SourceMgr; member in __anon7ce51b3c0111::LexerTest 291 macroPair = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F() 295 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F() 297 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F() 298 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F() [all …]
|
D | PPCallbacksTest.cpp | 117 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) { in PPCallbacksTest() 127 SourceManager SourceMgr; member in __anon943a28fc0111::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 …]
|
D | PPConditionalDirectiveRecordTest.cpp | 37 SourceMgr(Diags, FileMgr), in PPConditionalDirectiveRecordTest() 48 SourceManager SourceMgr; member in __anonae60f8ae0111::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/utils/FileCheck/ |
D | FileCheck.cpp | 128 SourceMgr &SM, 142 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer, 151 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM); 169 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM); 175 SourceMgr &SM, in ParsePattern() 187 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern() 214 SourceMgr::DK_Error, in ParsePattern() 246 SourceMgr::DK_Error, in ParsePattern() 259 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern() 272 SourceMgr::DK_Error, in ParsePattern() [all …]
|
/external/llvm/lib/TableGen/ |
D | Error.cpp | 23 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/ |
D | SourceMgr.h | 27 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/clang/lib/Format/ |
D | WhitespaceManager.h | 40 WhitespaceManager(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; 201 SourceManager &SourceMgr; variable
|
/external/clang/lib/Lex/ |
D | PPConditionalDirectiveRecord.cpp | 20 : 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()
|
D | PreprocessingRecord.cpp | 42 : 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 …]
|
D | PPLexerChange.cpp | 92 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 …]
|
D | Preprocessor.cpp | 66 AuxTarget(nullptr), FileMgr(Headers.getFileMgr()), SourceMgr(SM), in Preprocessor() 67 ScratchBuf(new ScratchBuffer(SourceMgr)), HeaderInfo(Headers), in Preprocessor() 225 const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); in DumpToken() 236 Loc.dump(SourceMgr); in DumpLocation() 339 Def = I->second.findDirectiveAtLoc(Loc, SourceMgr); in getLastMacroWithSpelling() 350 SourceMgr.isBeforeInTranslationUnit(BestLocation, Location))) { in getLastMacroWithSpelling() 380 const MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File, &Invalid); in SetCodeCompletionPoint() 405 SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()) == File) { in SetCodeCompletionPoint() 423 SourceMgr.overrideFileContents(File, std::move(NewBuffer)); in SetCodeCompletionPoint() 468 Loc = SourceMgr.createExpansionLoc(Loc, ExpansionLocStart, in CreateString() [all …]
|
D | ScratchBuffer.cpp | 25 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer() 72 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() 73 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
/external/llvm/lib/Support/ |
D | SourceMgr.cpp | 39 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/llvm/tools/llvm-mc/ |
D | Disassembler.cpp | 36 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/include/clang/AST/ |
D | RawCommentList.h | 43 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/CodeGen/MIRParser/ |
D | MIParser.h | 29 class SourceMgr; variable 71 bool parseMBBReference(MachineBasicBlock *&MBB, SourceMgr &SM, 76 bool parseNamedRegisterReference(unsigned &Reg, SourceMgr &SM, 82 bool parseVirtualRegisterReference(unsigned &Reg, SourceMgr &SM, 88 bool parseStackObjectReference(int &FI, SourceMgr &SM, MachineFunction &MF, 93 bool parseMDNode(MDNode *&Node, SourceMgr &SM, MachineFunction &MF,
|
/external/clang/lib/AST/ |
D | RawCommentList.cpp | 109 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/clang/lib/Rewrite/ |
D | Rewriter.cpp | 152 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/clang/lib/Frontend/ |
D | VerifyDiagnosticConsumer.cpp | 616 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument 625 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected() 629 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected() 630 SourceMgr->getFileID(I->first))) in PrintUnexpected() 632 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected() 645 SourceManager &SourceMgr, in PrintExpected() argument 654 OS << "\n File " << SourceMgr.getFilename(D.DiagnosticLoc); in PrintExpected() 658 OS << " Line " << SourceMgr.getPresumedLineNumber(D.DiagnosticLoc); in PrintExpected() 661 << SourceMgr.getFilename(D.DirectiveLoc) << ':' in PrintExpected() 662 << SourceMgr.getPresumedLineNumber(D.DirectiveLoc) << ')'; in PrintExpected() [all …]
|
/external/clang/lib/Edit/ |
D | Commit.cpp | 39 : 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()
|
D | EditedSource.cpp | 29 assert(SourceMgr.isMacroArgExpansion(Loc)); in deconstructMacroArgLoc() 30 SourceLocation DefArgLoc = SourceMgr.getImmediateExpansionRange(Loc).first; in deconstructMacroArgLoc() 31 ExpansionLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in deconstructMacroArgLoc() 33 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc() 34 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc() 68 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset() 103 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert() 417 applyRewrite(receiver, StrVec, CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites() 424 applyRewrite(receiver, StrVec, CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites() 436 SourceLocation BLoc = SourceMgr.getLocForStartOfFile(BeginOffs.getFID()); in getSourceText() [all …]
|
/external/clang/include/clang/Rewrite/Core/ |
D | Rewriter.h | 32 SourceManager *SourceMgr; variable 57 : SourceMgr(&SM), LangOpts(&LO) {} in Rewriter() 58 explicit Rewriter() : SourceMgr(nullptr), LangOpts(nullptr) {} in Rewriter() 61 SourceMgr = &SM; in setSourceMgr() 64 SourceManager &getSourceMgr() const { return *SourceMgr; } in getSourceMgr()
|