Lines Matching defs:SourceMgr
38 SourceMgr(Diags, FileMgr),
48 SourceManager SourceMgr;
77 FileID mainFileID = SourceMgr.createFileID(std::move(Buf));
78 SourceMgr.setMainFileID(mainFileID);
81 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
83 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
109 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1);
110 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6);
118 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc));
119 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc));
120 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(macroExpStartLoc, idLoc));
121 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, macroExpEndLoc));
130 FileID MainFileID = SourceMgr.createFileID(std::move(Buf));
131 SourceMgr.setMainFileID(MainFileID);
136 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, &Invalid));
140 EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 4, &Invalid));
144 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 7, &Invalid));
148 EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 11, &Invalid));
152 EXPECT_EQ(7U, SourceMgr.getColumnNumber(MainFileID, strlen(Source),
157 SourceMgr.getColumnNumber(MainFileID, strlen(Source)+1, &Invalid);
162 SourceMgr.getColumnNumber(FileID(), 0, &Invalid);
166 SourceMgr.getColumnNumber(FileID(), 1, &Invalid);
170 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, nullptr));
190 FileID mainFileID = SourceMgr.createFileID(std::move(MainBuf));
191 SourceMgr.setMainFileID(mainFileID);
195 SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf));
198 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
200 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
223 SourceLocation defLoc = SourceMgr.translateLineCol(mainFileID, 2, 13);
224 SourceLocation loc1 = SourceMgr.translateLineCol(mainFileID, 3, 8);
225 SourceLocation loc2 = SourceMgr.translateLineCol(mainFileID, 4, 4);
226 SourceLocation loc3 = SourceMgr.translateLineCol(mainFileID, 5, 7);
227 SourceLocation defLoc2 = SourceMgr.translateLineCol(mainFileID, 6, 22);
228 defLoc = SourceMgr.getMacroArgExpandedLocation(defLoc);
229 loc1 = SourceMgr.getMacroArgExpandedLocation(loc1);
230 loc2 = SourceMgr.getMacroArgExpandedLocation(loc2);
231 loc3 = SourceMgr.getMacroArgExpandedLocation(loc3);
232 defLoc2 = SourceMgr.getMacroArgExpandedLocation(defLoc2);
236 EXPECT_TRUE(SourceMgr.isMacroArgExpansion(loc2));
237 EXPECT_TRUE(SourceMgr.isMacroArgExpansion(loc3));
289 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(MainBuf)));
293 SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf));
296 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
298 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
352 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(Macros[3].Loc, Macros[4].Loc));
356 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(Macros[7].Loc, Macros[8].Loc));