News

Clang with Microsoft CodeGen: A VS 2015 Update 1 Gem

It's just one facet of the recent Visual Studio 2015 Update 1 release, but it's one that Visual C++ developers are excited to deploy. The update also includes numerous fixes to the standard library.

The Visual C++ team has introduced a new toolset in preview aimed at allowing code written with Visual C++ to be compiled and parsed for a number of differing platforms and targets. Clang with Microsoft CodeGen is a compiler that pairs up an open source version of the Clang parser with Visual C++'s code generator, optimizer and compiler.

Dave Bartolomeo with the Visual C++ team writes in a blog post that the goal is to allow developers using Visual C++ to use "the same Clang parser that you use for other targets, while still taking advantage of the advanced optimizations from the Visual C++ optimizer when you build for Windows."

"Because the new toolset uses the same Clang parser used for non-Windows targets, you won't need to have annoying #ifdefs throughout the code just to account for differences between the compilers," explains Bartolomeo, in the post. "Also, your code can take advantage of language features that are not currently available in the Visual C++ compiler, including C99 complex types and C++14 extended constexpr support. And because the Clang-based compiler generates the same debug information format as the Visual C++ compiler, you'll still be able to debug your code with the same great Visual Studio debugger experience."

Related to Bartolomeo's post, a few days earlier Visual C++ team member Cody Miller blogged about support for C++ 11-variety constant expressions that are part of the Visual Studio 2015 Update 1 release. An issue that reared up its head during development, wrote Miller, was that the compiler was having a problem with emitting static initializers. "Although the compiler had enough information to emit fully instantiated types that could be loaded from the compiled executable, it didn't emit the fully instantiated types," he explained. "These types were instantiated and constructed at runtime, as most C++ objects traditionally have been." Update 1 ships with the issue resolved.

Visual Studio 2015 Update 1 also includes a vast list of fixes to the Visual C++ Standard Library, noted here and in several links embedded in that link.

About the Author

You Tell 'Em, Readers: If you've read this far, know that Michael Domingo, Visual Studio Magazine Editor in Chief, is here to serve you, dear readers, and wants to get you the information you so richly deserve. What news, content, topics, issues do you want to see covered in Visual Studio Magazine? He's listening at [email protected].

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube