Skip to content

Commit

Permalink
Merge from 'master' to 'sycl-web' (intel#8)
Browse files Browse the repository at this point in the history
  CONFLICT (content): Merge conflict in clang/test/SemaOpenCL/address-spaces.cl
  • Loading branch information
bader committed Dec 4, 2019
2 parents 40194ea + fa9dd41 commit 0023d39
Show file tree
Hide file tree
Showing 183 changed files with 5,911 additions and 3,383 deletions.
8 changes: 8 additions & 0 deletions clang-tools-extra/clangd/clients/clangd-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"activationEvents": [
"onLanguage:c",
"onLanguage:cpp",
"onLanguage:cuda",
"onLanguage:objective-c",
"onLanguage:objective-cpp",
"onCommand:clangd-vscode.activate"
Expand Down Expand Up @@ -64,6 +65,13 @@
"**/MSVC/*/include/**"
],
"firstLine": "^/[/*].*-\\*-\\s*C\\+\\+\\s*-\\*-.*"
},
{
"id": "cuda",
"extensions": [
".cu",
".cuh"
]
}
],
"configuration": {
Expand Down
18 changes: 6 additions & 12 deletions clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,15 @@ export function activate(context: vscode.ExtensionContext) {
}
const serverOptions: vscodelc.ServerOptions = clangd;

// Note that CUDA ('.cu') files are special. When opening files of all other
// extensions, VSCode would load clangd automatically. This is achieved by
// having a corresponding 'onLanguage:...' activation event in package.json.
// However, VSCode does not have CUDA as a supported language yet, so we
// cannot add a corresponding activationEvent for CUDA files and clangd will
// *not* load itself automatically on '.cu' files.
const cudaFilePattern: string = '**/*.{' + [ 'cu' ].join() + '}';
const clientOptions: vscodelc.LanguageClientOptions = {
// Register the server for c-family and cuda files.
documentSelector: [
{ scheme: 'file', language: 'c' },
{ scheme: 'file', language: 'cpp' },
// cuda is not supported by vscode, but our extension does.
{ scheme: 'file', language: 'cuda' },
{ scheme: 'file', language: 'objective-c'},
{ scheme: 'file', language: 'objective-cpp'},
{ scheme: 'file', pattern: cudaFilePattern },
{ scheme: 'file', language: 'objective-cpp'}
],
synchronize: !syncFileEvents ? undefined : {
// FIXME: send sync file events when clangd provides implemenatations.
Expand All @@ -111,10 +105,10 @@ export function activate(context: vscode.ExtensionContext) {
serverOptions, clientOptions);
if (getConfig<boolean>('semanticHighlighting')) {
const semanticHighlightingFeature =
new semanticHighlighting.SemanticHighlightingFeature(clangdClient,
context);
new semanticHighlighting.SemanticHighlightingFeature(clangdClient,
context);
context.subscriptions.push(
vscode.Disposable.from(semanticHighlightingFeature));
vscode.Disposable.from(semanticHighlightingFeature));
clangdClient.registerFeature(semanticHighlightingFeature);
}
console.log('Clang Language Server is now active!');
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ add_clang_library(clangDaemonTweaks OBJECT
AnnotateHighlightings.cpp
DumpAST.cpp
DefineInline.cpp
DefineOutline.cpp
ExpandAutoType.cpp
ExpandMacro.cpp
ExtractFunction.cpp
Expand Down
Loading

0 comments on commit 0023d39

Please sign in to comment.