Showing results for May 2021 - C++ Team Blog

May 27, 2021
1
0

Preview of using CMake Presets for Azure Sphere development

Marc Goodner
Marc Goodner

We are happy to announce that CMake Presets preview support is available in the Visual Studio 16.10 release as well as CMake Tools version 1.7 for Visual Studio Code. Erika introduced CMake Presets and why you should use them, this post will focus on how they can be used for Azure Sphere development across Visual Studio, VS Code, and GitHub Acti...

AnnouncementCMakeContainers
May 26, 2021
1
0

C++20 Ranges are complete in Visual Studio 2019 version 16.10

Casey Carter
Casey Carter

We are proud to announce completion of our implementation of C++20 Ranges in the Standard Library in the VS2019 v16.10 release under. We announced the first useful user-visible parts of Ranges in VS 2019 v16.6 in mid 2020, the trickle accelerated into a gushing stream, and the final parts are now in place. This represents a huge body of work with i...

C++
May 24, 2021
0
0

How to start using registries with vcpkg

Nicole Mazzuca
Nicole Mazzuca

For many users of vcpkg, the built-in repository of packages is completely sufficient. If you only need public, non-experimental libraries, the default vcpkg registry is completely fine. However, once you go outside of this world - once you have company-internal libraries, or you want to use experimental libraries, the recommended solution is to us...

C++
May 13, 2021
0
0

Microsoft C++ Code Analysis supports SARIF 2.1

Hwi-sung Im
Hwi-sung Im

Starting with Visual Studio 16.8, MSVC Code Analysis officially supports SARIF 2.1.0 standard. SARIF is an industry standard for representing static analysis logs and we've been one of the earliest collaborators with the SARIF Technical Committee. Behind the scenes, analysis log files in the SARIF format powers Visual Studio IDE to provide a richer...

C++Diagnostics
May 12, 2021
8
0

OpenMP Updates and Fixes for C++ in Visual Studio 2019 version 16.10

Chris Pulido
Chris Pulido

In our previous blog post about improved OpenMP support in Visual Studio, we announced the addition of the -openmp:llvm switch in Visual Studio 2019 version 16.9 to enable compiled programs to target LLVM’s OpenMP runtime library for the x64 architecture. This switch supports all the OpenMP 2.0 directives that -openmp supports, as well as unsigned ...

C++OpenMP
May 11, 2021
2
0

New Static Analysis Rule for Bounds Checking

Jordan Maples
Jordan Maples

We have added a new experimental static analysis rule in Visual Studio 16.10 version Preview 3 - C26458, . The new warning is a more precise and less noisy version of warning C26446, . Both warnings analyse standard containers for unchecked element access and they both share the warning message: “Prefer to use instead of unchecked subscript operat...

C++General C++ SeriesWriting Code
May 10, 2021
3
0

Finding Bugs with AddressSanitizer: Patterns from Open Source Projects

Kevin Cadieux
Kevin Cadieux

AddressSanitizer (ASan) was officially released in Visual Studio 2019 version 16.9. We recently used this feature to find and fix a bug in the MSVC compiler itself. To further validate the usefulness of our ASan implementation, we also used it on a collection of widely used open source projects where it found bugs in Boost, Azure IoT C SDK, and Ope...

C++Diagnostics
May 7, 2021
3
0

2x-3x Performance Improvements for Debug Builds

Pranav Kant
Pranav Kant

We have made substantial runtime performance improvements in the x86/x64 C++ compiler for Visual Studio's default debug configuration. For Visual Studio 2019 version 16.10 Preview 2, we measure 2x - 3x speedup for programs compiled in debug mode. These improvements come from reducing the overhead introduced by runtime checks (/RTCs) which are enabl...

C++performancefaster
May 6, 2021
6
0

Ignoring Automatic Initialization for Code Analysis

Gabor Horvath
Gabor Horvath

Reading uninitialized memory is one of the major sources of security vulnerabilities in C and C++ programs. Microsoft developed many tools to find such errors including compiler warnings, static analysis checks, and more recently: code instrumentation.  For a more detailed overview of uninitialized memory related vulnerabilities and mitigations ple...

C++