Page MenuHomePhabricator

[clangd] Detect C++ language based on well-known file path in vscode extension
ClosedPublic

Authored by hokein on Jun 18 2019, 4:30 AM.

Details

Summary

Matching the "C++" pattern on the first line of the file doesn't cover
all cases, MSVC C++ headers doesn't have such pattern. This patch
introduce a new heuristic to detect language based on the file path.

MSVC C++ standard headers are in the directory like
"c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include"

Diff Detail

Repository
rL LLVM

Event Timeline

hokein created this revision.Jun 18 2019, 4:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2019, 4:30 AM
sammccall accepted this revision.Jun 18 2019, 4:34 AM
This revision is now accepted and ready to land.Jun 18 2019, 4:34 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2019, 4:50 AM