HomePhabricator

[clangd] Detect C++ for extension-less source files in vscode extension

Authored by hokein on Jun 17 2019, 5:59 AM.

Description

[clangd] Detect C++ for extension-less source files in vscode extension

Summary:
Extend our extension to support detecting these files as C++ files based on the first
line (-*- C++ -*-), it will make clangd work on C++ standard headers
(e.g. iostream).

We use the contributes.languages[1] to enrich the builtin VScode C++
support.

[1]: https://code.visualstudio.com/api/references/contribution-points#contributes.languages

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63397

llvm-svn: 363554