Completion and Diagnostic for C/C++/Objective-C using Clang
Switch branches/tags
Nothing to show
Clone or download
Latest commit c6ff1a1 Mar 4, 2017

C/C++ Clang Command Adapter

Completion and Diagnostic for C/C++/Objective-C using Clang command.

Important Notes

Clang project officialy starts to implement Language Server named clangd. (

This extension was renamed to C/C++ Clang Command Adapter to avoid confusion, because this extension is unofficial and only parse output of clang command.


  • Install Clang
    • For Max OS X, Clang is installed with Xcode Command Line Tools and PATH is configured automatically.
  • Configure the PATH environment variable so that you can execute clang command.
    • or specify clang.executable configuration (See the next section for detail)


You can use configuration interface of Visual Studio Code. (Press F1 and type User Settings or Workspace Settings)


  • clang.executable: Clang command or the path to the Clang executable (default: clang)
  • clang.cflags, clang.cxxflags, clang.objcflags: Compiler Options for C/C++/Objective-C


  • clang.completion.enable: Enable/disable completion feature (default: true)
  • clang.completion.maxBuffer: Tolerable size of clang output for completion (default: 8 * 1024 * 1024 bytes)
  • clang.completion.triggerChars: Trigger completion when the user types one of the characters (default: [".", ":", ">"])


  • clang.diagnostic.enable: Enable/disable diagnostic feature (default: true)
  • clang.diagnostic.maxBuffer: Tolerable size of clang output for diagnostic. (default: 256 * 1024 bytes)
  • clang.diagnostic.delay: The delay in millisecond after which diagnostic starts (default: 500)


Configurations support some variables which are available in tasks.json. They can be used inside of strings (e.g. "-I${workspaceRoot}/include")

  • ${workspaceRoot}
  • ${cwd}


Since version 0.2.0, clang.diagnosticDelay, clang.enableCompletion, clang.enableDiagnostic is deprecated. Please update as follows:

  • clang.enableCompletion -> clang.completion.enable
  • clang.enableDiagnostic -> clang.diagnostic.enable
  • clang.diagnosticDelay -> clang.diagnostic.delay


  • Show Executable and Compile Options: Showing Clang executable and compile options for the active editor.