Finding Bugs using Path-Sensitive Static Analysishttps://aka.ms/cppcon ## Agenda • Intro to path-sensitive static analysis • Path-sensitive checks in MSVC • A look under the hood • Upcoming features • Lessons learned  ## FILIP SAJDAK Head of Engineering I am helping teams build HMI for premium cars SIILI AUTO Subsumption rules are not easy to grasp at first – CE gives fast feedbacks ## x is Type g++-10 Clang-12 MSVC v19.29 templateconstexpr auto is( X const& ) -> bool { } ## x is Type g++-10 Clang-12 MSVC v19.29 template< typename C, typename X> constexpr auto is( X const& ) -> std::false_type0 码力 | 108 页 | 5.08 MB | 1 年前3
Hidden Overhead of a Function API(AMD64) Microsoft ABI x64 calling convention x64 msvc v19.40 VS17.10 -02 /std:c++20 x86 (IA-32) Microsoft ABI calling conventions x86 msvc v19.40 VS17.10 -02 /std:c++20 ## Things are complicated operator delete(void*) add rsp, 16 mov eax, ebx pop rbx ret mov rbx, rax jmp .L5 #### x64 msvc v19.40 VS17.10 push rbx sub rsp, 32 lea rcx, QWORD PTR ptr[rsp] call value_ptr() mov rcx, QWORD call operator delete(void*) add rsp, 16 mov eax, ebx pop rbx ret mov rbx, rax jmp .15 #### x64 msvc v19.40 VS17.10 ## Stack unwinding on exception push rbx sub rsp, 32 lea rcx, QWORD PTR ptr[$rsp]0 码力 | 158 页 | 2.46 MB | 1 年前3
whats new in visual studiothe creation of the C++ Standards Our agenda today 2. by investing in the Microsoft Visual C++ (MSVC) Compiler & Libraries 3. by simplifying acquisition in C++ via vcpkg 4. by improving the Visual Visual Studio versions (e.g. 2019, 2017) Step #2: Compile your code (with the same compiler as today) MSVC 2015, 2017 and 2019 toolsets are available directly from Visual Studio 2022 Step #3: Compile your minor releases of the MSVC toolset at your own pace ? Side-by-side minor Visual Studio 2022 toolsets (14.30, 14.31, etc.) Porting and Upgrading Guide: https://aka.ms/cpp/upgrade ☐ MSVC v141 - VS 2017 C++0 码力 | 42 页 | 19.02 MB | 1 年前3
Lifetime Safety in C++: Past, Present and Futurestring_view(string("")); else pretty = string_view(string(thing)); C26815, C26816 in MSVC, -Wdangling-gsl in Clang, -Wdangling-reference in GCC ## C26815 & C26816, -Wdangling-gsl jpg) ## Lifetimebound annotation (P0936) struct X { int a, b; }; const int& f(const X& x [[msvc::lifetimebound]]) { return x.b; } const int& r = f(X()); // warn  ## Lifetimebound annotation (P0936) struct X { int a, b; }; const int& f(const X& x [[msvc::lifetimebound]]) { return x.b; }  to download and install the .msi Installer software and then install the MSVC8 redistributable pack. ## ATTENTION! Firebird binaries are built against the original version of0 码力 | 46 页 | 217.89 KB | 2 年前3
C++高性能并行编程与优化 - 课件 - 11 现代 CMake 进阶指南endif() ### project:初始化项目信息,并把当前 CMakeLists.txt 所在位置作为根目录 这里初始化了一个名称为 hellomake 的项目,为什么需要项目名? 对于 MSVC,他会在 build 里生成 hellomake.sln 作为“IDE 眼中的项目”。 CMakeLists.txt 1 cmake_minimum_required(VERSION 3.15) 就会是子模块的源码目录而不是外层了。这时候 CMake 会认为这个子模块是个独立的项目,会额外做一些初始化。他的构建目录 PROJECT_BINARY_DIR 也会变成 build/<源码相对路径>。这样在 MSVC 上也会看见 build/mylib/mylib.vcxproj 的生成。 PROJECT_NAME: hellocmake PROJECT_SOURCE_DIR: /home/bate/Co CMAKE_CXX_extensions 也是 BOOL 类型,默认为 ON。设为 ON 表示启用 GCC 特有的一些扩展功能;OFF 则关闭 GCC 的扩展功能,只使用标准的 C++。 - 要兼容其他编译器(如 MSVC)的项目,都会设为 OFF 防止不小心用了 GCC 才有的特性。 - 此外,最好是在 project 指令前设置 CMAKE_CXX_STANDARD 这一系列变量,这样 CMake 可以在 project0 码力 | 166 页 | 6.54 MB | 2 年前3
C++20's C++20'sCalendars and Time Zones in MSVC ## MIYA NATSUHARA 20 21 October 24-29 # C++20'sCalendars and Time Zones in MSVC # Miya Natsuhara ("MEE-yuh Not-soo-HAR-uh") Part III: Clocks • Part IV: Leap Seconds • What are leap seconds? • How did we implement them in MSVC? • Part V: Time Zones • Overview of [time.zone] • IANA database challenges • Part VI: Conclusion Part IV: Leap Seconds (sorry for the detour) The leap second story in MSVC... It's complicated. ## The leap second story in MSVC • Previously, the Windows operating system did not keep track of leap 0 码力 | 55 页 | 8.67 MB | 1 年前3
C++20 Modules: The Packaging and Binary Redistribution Storymatter - Potential for improved build times (more on this later) ## Why use modules (cont'd) ## MSVC Compilation Funtimes PUBLISHED BY WIREPAIR ON AUGUST 2, 2023 #define NOMINMAX #includemsvc|/reference fmt=/path/to/fmt.ifc| |clang|-fprebuilt-module-path=/path/to/folder-fmodule-file=fmt=/path/to/fmt Module interface unit fmt.o Other file extensions: .ixx (msvc) .cppm (clang) BMI file extensions: .pcm (clang) .gcm (gcc) .ifc (msvc) libfmt.a ## Module interface unit export module fmt; export 0 码力 | 76 页 | 2.09 MB | 1 年前3
Conan 2.5 Documentationassumption that if the compiler is msvc the # CMake generator is multi-config multi = True if self.settings.get_safe("compiler") == "msvc" else False if multi: Release/Debug). In this case we added a simple logic to consider multi-config if the compiler name is msvc. Check that running the same commands as in the previous examples without the -output-folder argument Release\example pkg/0.1: Hello World Release! pkg/0.1: _M_X64 defined pkg/0.1: MSVC runtime: MultiThreadedDLL pkg/0.1: _MSC_VER1939 pkg/0.1: _MSVC_LANG201402 pkg/0.1: __cplusplus199711 pkg/0.1 test_package ## I mportant0 码力 | 769 页 | 4.70 MB | 1 年前3
共 257 条
- 1
- 2
- 3
- 4
- 5
- 6
- 26
相关搜索词
路径敏感静态分析空指针解引用检测Fourier-Motzkin消除法MSVCC++团队博客C++Herb Sutter模式匹配类型安全强制类型转换函数APIstd::function性能优化C++23Snap64-bit IDEC++20WSL 2静态分析Lifetime SafetyCrubitCore GuidelinesP2771Firebird安装环境变量注册表键清理旧版本安装CMakeNinjaCMakeLists.txt缓存变量构建类型chrono 库时钟时区calendrical 类型C++20 ModulesBinary Module Interface (BMI)Build ToolsCompiler CompatibilityPackaging and RedistributionConan 2.5.0Python APIbuild system integrationspackage_idlockfiles













