You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Summary: _CONTROL_FLOW_GUARD defined by MSVC compiler not showing up in C++ IntelliSense properly.
From the official Microsoft documentation: _CONTROL_FLOW_GUARD defined as 1 when the /guard:cf (Enable Control Flow Guard) compiler option is set. Otherwise, undefined.
if (MSVC)
add_compile_options(/guard:cf)
add_link_options(/GUARD:CF)
endif()
Add C++ code to ensure this is being set properly.
#ifndef _CONTROL_FLOW_GUARD
#error "Control flow guard is not enabled!"
#endif
It's important to note that _MT is another predefined-macro defined by the MSVC compiler. However, that one doesn't have an IntelliSense issue.
Configuration and Logs
Can't supply log. When I ran C/C++ Log Diagnostics proprietary company info was getting logged.This issue is super easy to reproduce I've seen it on other developers machines for a while now.
Other Extensions
Only the standard C/C++/CMake Microsoft extensions
juan-amd Thanks for reporting this. I created another issue to track reviewing the other predefined msvc macros we might not be handling correctly at #14312.
Activity
[-]_CONTROL_FLOW_GUARD[/-][+]_CONTROL_FLOW_GUARD IntelliSense bug[/+]sean-mcmanus commentedon Mar 23, 2026
juan-amd Thanks for reporting this. I created another issue to track reviewing the other predefined msvc macros we might not be handling correctly at #14312.
sean-mcmanus commentedon Mar 24, 2026
juan-amd Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.31.3.