Clang with Microsoft CodeGen (March 2016) released

We’re excited to announce the latest update of our Clang with Microsoft CodeGen (a.k.a. Clang/C2) toolset. This release brings a number of fixes for bugs reported by developers in the community as well as fixes for some bugs found in our testing. For example, many of you reported that you couldn’t use Clang/C2 with larger projects. With this update we’ve enabled the /bigobj so now you can use Clang/C2 with large projects. We’ve also fixed a number of bugs in the compiler, libraries, debuggers, and made changes to improve the reliability of the installation process.

Did you just download Visual Studio 15 preview? Don’t worry, Clang/C2 is available in VS15 as well. The March 2016 update is available either as an option in the initial setup dialog or by selecting the template under New Project -> Visual C++ -> Cross Platform.

clang

This is the third release of Clang with Microsoft CodeGen. This post only discusses changes since the January update so if you’re new to Clang/C2 you should refer back to the two previous posts. The blog post for the initial November release provides a lot of good detail about the toolset and the blog post for the January update covers our first round of progress and bug fixes. (All of these posts are tagged with the keyword “clang”.)

This release is based on Clang 3.7 and revises the version of C2.dll to 19.0.25115.0.

New Features

  • Support for the /bigobj switch, enabling the compiler to emit object files that have more than 64K symbols. This is most often necessary for large machine-generated source files, or for code that uses templates heavily.

Fixes for customer reported bugs

  • Fixed a bug in path names given to clang.exe when the path contains a hyphen (-)
  • Fix bug in IDE where additional backslash (\) in path eats a subsequent quotation mark (“)
  • Fixed an assertion coming from Boost where char16_t/char32_t were not recognized as built-in types.

Fixes in setup and packaging

  • Future updates will be available through the “Notifications” toolbox for developers who have already installed the component.

Fixes in the STL and CRT

  • Fixed multiple internal compiler errors coming from compilation of library code
  • Enabled Clang to properly copy thrown exceptions
  • The CRT now uses __builtin_offset when compiled with Clang
  • Two bug fixes to make progress on compiling Ranges v3 with Clang

Fixes in the debugger

  • Distinguish between ‘HRESULT’ and ‘long’
  • Fix missing debug info for base classes that are template specializations.

How to get this update

  • Method 1:

    • Control Panel->Programs->Programs and Features
    • Right click on “Microsoft Visual Studio Enterprise 2015” (or “Microsoft Visual Studio 15 Preview” if you have the preview of the next version of Visual Studio installed)
    • Click “Change”
    • Click “Modify”
    • Select “Clang with Microsoft CodeGen” – The March 2016 release. The previous release would be marked as “Deprecated”.
  • Method 2:

    • For Visual Studio 2015: Download and run the VS 2015 installer directly
    • For preview of Visual Studio 15, use the Visual Studio 15 installer

Bug Reporting

When submitting bug reports that are specific to Clang/C2 (i.e. they are not reproducible in Clang/LLVM), make sure to:

  • Submit your issues at https://connect.microsoft.com/VisualStudio
  • Prefix your bug report title with [Clang/C2]
  • When applicable, make sure to include preprocessed source(s) and associated run script(s) that are reported when ICE happens. Search for the string “PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:” in your build log.
  • You can also email us questions at clangc2 at microsoft.com.