[PATCH] D41343: [clangd] in VSCode client, filter extensions properly and only accept file: URIs

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 01:50:57 PST 2017


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: clangd/clients/clangd-vscode/src/extension.ts:25
 
-    const cppFileExtensions: string[] = ['cpp', 'c', 'cc', 'cxx', 'c++', 'm', 'mm', 'h', 'hh', 'hpp', 'hxx', 'inc'];
-    const cppFileExtensionsPattern = cppFileExtensions.join();
+    const filePattern: string = "**/*.{" +
+      ['cpp', 'c', 'cc', 'cxx', 'c++', 'm', 'mm', 'h', 'hh', 'hpp', 'hxx', 'inc'].join() + "}";
----------------
nit: maybe use `'` to be consistent with other places of this file.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41343





More information about the cfe-commits mailing list