File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ using namespace llvm;
36
36
using clang::detail::SarifArtifact;
37
37
using clang::detail::SarifArtifactLocation;
38
38
39
- static StringRef getFileName (const FileEntry & FE) {
40
- StringRef Filename = FE.tryGetRealPathName ();
39
+ static StringRef getFileName (FileEntryRef FE) {
40
+ StringRef Filename = FE.getFileEntry (). tryGetRealPathName ();
41
41
if (Filename.empty ())
42
42
Filename = FE.getName ();
43
43
return Filename;
@@ -215,8 +215,8 @@ SarifDocumentWriter::createPhysicalLocation(const CharSourceRange &R) {
215
215
assert (R.isCharRange () &&
216
216
" Cannot create a physicalLocation from a token range!" );
217
217
FullSourceLoc Start{R.getBegin (), SourceMgr};
218
- const FileEntry * FE = Start.getExpansionLoc ().getFileEntry ();
219
- assert (FE != nullptr && " Diagnostic does not exist within a valid file!" );
218
+ OptionalFileEntryRef FE = Start.getExpansionLoc ().getFileEntryRef ();
219
+ assert (FE && " Diagnostic does not exist within a valid file!" );
220
220
221
221
const std::string &FileURI = fileNameToURI (getFileName (*FE));
222
222
auto I = CurrentArtifacts.find (FileURI);
You can’t perform that action at this time.
0 commit comments