This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb1e5b28b8c4d: [clang][lex] NFCI: Use FileEntryRef in Sema::CodeCompleteIncludedFile (authored by jansvoboda11). Herald added a subscriber: ributzka.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127658/new/ https://reviews.llvm.org/D127658 Files: clang/lib/Sema/SemaCodeComplete.cpp Index: clang/lib/Sema/SemaCodeComplete.cpp =================================================================== --- clang/lib/Sema/SemaCodeComplete.cpp +++ clang/lib/Sema/SemaCodeComplete.cpp @@ -10055,12 +10055,12 @@ // header maps are not (currently) enumerable. break; case DirectoryLookup::LT_NormalDir: - AddFilesFromIncludeDir(IncludeDir.getDir()->getName(), IsSystem, + AddFilesFromIncludeDir(IncludeDir.getDirRef()->getName(), IsSystem, DirectoryLookup::LT_NormalDir); break; case DirectoryLookup::LT_Framework: - AddFilesFromIncludeDir(IncludeDir.getFrameworkDir()->getName(), IsSystem, - DirectoryLookup::LT_Framework); + AddFilesFromIncludeDir(IncludeDir.getFrameworkDirRef()->getName(), + IsSystem, DirectoryLookup::LT_Framework); break; } }; @@ -10072,9 +10072,8 @@ using llvm::make_range; if (!Angled) { // The current directory is on the include path for "quoted" includes. - const FileEntry *CurFile = PP.getCurrentFileLexer()->getFileEntry(); - if (CurFile && CurFile->getDir()) - AddFilesFromIncludeDir(CurFile->getDir()->getName(), false, + if (auto CurFile = PP.getCurrentFileLexer()->getFileEntry()) + AddFilesFromIncludeDir(CurFile->getDir().getName(), false, DirectoryLookup::LT_NormalDir); for (const auto &D : make_range(S.quoted_dir_begin(), S.quoted_dir_end())) AddFilesFromDirLookup(D, false);
Index: clang/lib/Sema/SemaCodeComplete.cpp =================================================================== --- clang/lib/Sema/SemaCodeComplete.cpp +++ clang/lib/Sema/SemaCodeComplete.cpp @@ -10055,12 +10055,12 @@ // header maps are not (currently) enumerable. break; case DirectoryLookup::LT_NormalDir: - AddFilesFromIncludeDir(IncludeDir.getDir()->getName(), IsSystem, + AddFilesFromIncludeDir(IncludeDir.getDirRef()->getName(), IsSystem, DirectoryLookup::LT_NormalDir); break; case DirectoryLookup::LT_Framework: - AddFilesFromIncludeDir(IncludeDir.getFrameworkDir()->getName(), IsSystem, - DirectoryLookup::LT_Framework); + AddFilesFromIncludeDir(IncludeDir.getFrameworkDirRef()->getName(), + IsSystem, DirectoryLookup::LT_Framework); break; } }; @@ -10072,9 +10072,8 @@ using llvm::make_range; if (!Angled) { // The current directory is on the include path for "quoted" includes. - const FileEntry *CurFile = PP.getCurrentFileLexer()->getFileEntry(); - if (CurFile && CurFile->getDir()) - AddFilesFromIncludeDir(CurFile->getDir()->getName(), false, + if (auto CurFile = PP.getCurrentFileLexer()->getFileEntry()) + AddFilesFromIncludeDir(CurFile->getDir().getName(), false, DirectoryLookup::LT_NormalDir); for (const auto &D : make_range(S.quoted_dir_begin(), S.quoted_dir_end())) AddFilesFromDirLookup(D, false);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits