malaperle requested changes to this revision.
malaperle added inline comments.
This revision now requires changes to proceed.


================
Comment at: clangd/ClangdServer.cpp:292
+
+  if (path.compare(path.length() - 4, 4, ".cpp") == 0) {
+    path = path.substr(0, (path.length() - 4));
----------------
this won't work for other extensions, we need to make this more generic. I 
believe you had a list of typical source files extensions and header extensions 
before?


================
Comment at: clangd/ClangdServer.cpp:294
+    path = path.substr(0, (path.length() - 4));
+    path.append(".h");
+    return "\"" + path + "\"";
----------------
we need to try if the file exists otherwise try other typical header extensions


================
Comment at: clangd/ClangdServer.cpp:296
+    return "\"" + path + "\"";
+  } else if (path.compare(path.length() - 2, 2, ".h") == 0) {
+    path = path.substr(0, (path.length() - 2));
----------------
needs to be more generic and handle more typical header extensions


================
Comment at: test/clangd/hover.test:1
+# RUN: clangd -run-synchronously < %s | FileCheck %s
+# It is absolutely vital that this file has CRLF line endings.
----------------
this is from another patch


https://reviews.llvm.org/D36150



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

Reply via email to