Lines Matching refs:SourceMgr
37 SourceMgr(Diags, FileMgr), in SourceManagerTest()
47 SourceManager SourceMgr; member in __anon6f5b52de0111::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()
120 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(macroExpStartLoc, idLoc)); in TEST_F()
121 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, macroExpEndLoc)); in TEST_F()
131 FileID MainFileID = SourceMgr.createFileID(std::move(Buf)); in TEST_F()
132 SourceMgr.setMainFileID(MainFileID); in TEST_F()
137 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, &Invalid)); in TEST_F()
141 EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 4, &Invalid)); in TEST_F()
145 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 7, &Invalid)); in TEST_F()
149 EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 11, &Invalid)); in TEST_F()
153 EXPECT_EQ(7U, SourceMgr.getColumnNumber(MainFileID, strlen(Source), in TEST_F()
158 SourceMgr.getColumnNumber(MainFileID, strlen(Source)+1, &Invalid); in TEST_F()
163 SourceMgr.getColumnNumber(FileID(), 0, &Invalid); in TEST_F()
167 SourceMgr.getColumnNumber(FileID(), 1, &Invalid); in TEST_F()
171 EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, nullptr)); in TEST_F()
193 FileID mainFileID = SourceMgr.createFileID(std::move(MainBuf)); in TEST_F()
194 SourceMgr.setMainFileID(mainFileID); in TEST_F()
198 SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf)); in TEST_F()
201 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
203 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
226 SourceLocation defLoc = SourceMgr.translateLineCol(mainFileID, 2, 13); in TEST_F()
227 SourceLocation loc1 = SourceMgr.translateLineCol(mainFileID, 3, 8); in TEST_F()
228 SourceLocation loc2 = SourceMgr.translateLineCol(mainFileID, 4, 4); in TEST_F()
229 SourceLocation loc3 = SourceMgr.translateLineCol(mainFileID, 5, 7); in TEST_F()
230 SourceLocation defLoc2 = SourceMgr.translateLineCol(mainFileID, 6, 22); in TEST_F()
231 defLoc = SourceMgr.getMacroArgExpandedLocation(defLoc); in TEST_F()
232 loc1 = SourceMgr.getMacroArgExpandedLocation(loc1); in TEST_F()
233 loc2 = SourceMgr.getMacroArgExpandedLocation(loc2); in TEST_F()
234 loc3 = SourceMgr.getMacroArgExpandedLocation(loc3); in TEST_F()
235 defLoc2 = SourceMgr.getMacroArgExpandedLocation(defLoc2); in TEST_F()
239 EXPECT_TRUE(SourceMgr.isMacroArgExpansion(loc2)); in TEST_F()
240 EXPECT_TRUE(SourceMgr.isMacroArgExpansion(loc3)); in TEST_F()
294 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(MainBuf))); in TEST_F()
298 SourceMgr.overrideFileContents(headerFile, std::move(HeaderBuf)); in TEST_F()
301 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
303 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
357 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(Macros[3].Loc, Macros[4].Loc)); in TEST_F()
361 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(Macros[7].Loc, Macros[8].Loc)); in TEST_F()