Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Clang Optimization ViewerNew to Visual Studio Code? Get it now.
Clang Optimization Viewer

Clang Optimization Viewer

Preview

damkjaer

|
4,506 installs
| (0) | Free
Show optimization remarks from clang right in your editor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Get optimization remarks from clang directly in your source code

This extension is still in preview and may not function

Setup:

  • Ensure you have a compile_commands.json, see "Compilation Database" for instructions
  • Make sure clang is installed and available in your path (if not in path, you can use a setting)
  • If you get errors about libclang, configure the correct path for this in the settings

Compilation database

The tool needs to know how to compile your code and it does so using a compilation database. You can read about what they are and how to create them here.

If you're using cmake, there is a flag in the link telling you how to generate the compile_commands.json

Make has no built in way to generate a compilation database but you can generate one using compiledb as follows:

pip install compiledb compiledb make

Disclaimers

  • Windows likely doesn't work, who knows (email me if you try it and happens to work)
  • Built in great haste, contributions welcome
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft