malaperle added inline comments.

================
Comment at: clangd/ClangdUnit.cpp:1029
+  SourceLocation LocStart = ValSourceRange.getBegin();
+  SourceLocation LocEnd = Lexer::getLocForEndOfToken(ValSourceRange.getEnd(), 
0,
+                                                     SourceMgr, LangOpts);
----------------
  const FileEntry *F =
          SourceMgr.getFileEntryForID(SourceMgr.getFileID(LocStart));
  if (!F)
    return llvm::errc::no_such_file_or_directory;


================
Comment at: clangd/ClangdUnit.cpp:1039
+  Location L;
+  if (const FileEntry *F =
+          SourceMgr.getFileEntryForID(SourceMgr.getFileID(LocStart))) {
----------------
FE can be null. How about returning a llvm::ErrorOr ?


================
Comment at: clangd/ClangdUnit.cpp:1242
+
+  const FileEntry *FE =
+      AST.getASTContext().getSourceManager().getFileManager().getFile(
----------------
FE can be null. How about returning a llvm::ErrorOr ?


https://reviews.llvm.org/D35894



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to