LLVM's Realtime Safety Revolution: Tools for Modern Mission Critical Systems
#2 0x104429450 in std::__1::__libcpp_allocate[abi:v160006](unsigned long, unsigned long)+0x44 > clang -fsanitize=address main.cpp #includeint main() { auto v = std::vector (16); RealtimeSanitizer (RTSan) float process(float x) { auto const y = std::vector (16); ... } > clang++ -fsanitize=realtime main.cpp > ./a.out ==86660==ERROR: RealtimeSanitizer: unsafe-library-call Intercepted cpp:6:14 #12 0x102c02c00 in main+0x1c /app/example.cpp:12:5 [[clang::nonblocking]]Two steps 1. Attribute real-time functions with [[clang::nonblocking]] 2. Compile and link with -fsanitize=realtime 0 码力 | 153 页 | 1.38 MB | 5 月前32020: The Year of Sanitizers?
2020: The Year of Sanitizers? Victor Ciura Principal Engineer @ciura_victor2 Abstract Clang-tidy is the go-to assistant for most C++ programmers looking to improve their code, whether to modernize smart tools, you have to try dynamic/runtime analysis. After years of improvements and successes for Clang and GCC users, LLVM AddressSanitizer (ASan) is finally available on Windows, in the latest Visual under active development 3.5 million lines of C++ code a few brave nerds… or “How we manage to clang-tidy our whole code base, while maintaining our monthly release cycle” Why Do I Care ? 2020 Victor0 码力 | 135 页 | 27.77 MB | 5 月前3Extending and Simplifying C++: Thoughts on Pattern Matching using 'is' and 'as', and Can C++ be 10x Simpler & Safer?
and 30" << std::endl; } 2Or like that? x as Type; 31 If you have C++20 compiler (GCC 10+, Clang 12+, MSVC 16.30+) Available now!Advancing cppfront with Modern C++ Refining the Implementation Compiler Explorer! g++-10 Clang-12 MSVC v19.29 33x is Type • Avoid type traits, • Avoid negations & parens, • Use Compiler Explorer! • Use std::false_type / true_types g++-10 Clang-12 MSVC v19.29 34355 const& value ) inline constexpr bool is( auto const& x, auto const& value ) 38x is value g++-10 Clang-12 MSVC v19.29 inline constexpr bool is( auto const& x, auto const& value ) { if constexpr (requires{0 码力 | 108 页 | 5.08 MB | 5 月前3Just-In-Time Compilation: The Next Big Thing
COMPILED C++ EASY-JIT EASY-JIT 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS CLING CLING RUNTIME EASY-JIT P1609R1 P1609R1 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - **** * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS ** COMPILE-TIME P1609R1 D MIXIN D MIXIN 4 . 2EXISTING SOLUTIONS - C++ EXISTING SOLUTIONS - C++ / / [[CLANG::JIT]] [[CLANG::JIT]] - - **** * WITH CUSTOM MODIFICATIONS * WITH CUSTOM MODIFICATIONS ** COMPILE-TIME0 码力 | 222 页 | 5.45 MB | 5 月前3Hidden Overhead of a Function API
device 19armv8-a System V ABI Procedure Call Standard for the Arm® 64-bit Architecture armv8-a clang 18.1.0 -O2 -std=c++20 x86-64 (AMD64) System V ABI AMD64 Architecture Processor Supplement x86-64 -O2 /std:c++20 armv7-a System V ABI Procedure Call Standard for the Arm® Architecture armv7-a clang 11.0.1 -O2 -std=c++20 x86 (IA-32) System V ABI Intel386 Architecture Processor Supplement x86-64 = nullptr; } - return by value - output parameter 24 https://godbolt.org/z/ea9M3G94sarmv8-a clang 18.1.0 x86-64 gcc 14.2 x64 msvc v19.40 VS17.10 str xzr, [x8] ret mov QWORD PTR [rdi], 0 mov0 码力 | 158 页 | 2.46 MB | 5 月前3Mastering C++ Modules
module B; export void b() { }Built Module Interface (BMI) • MSVC – .ifc file • G++ – .gcm file • Clang – .pcm • http://www.open-std.org/jtc1/sc22/wg21/doc s/papers/2020/p1838r0.pdf 12Simple Example cmake_ninja_dyndep 21Where we are today • Support for p1689r5 in compiler releases – Visual studio 2022 – Clang 16 and newer – GCC 14 • CMake 3.28 support for modules • CMake 3.29 experimental support for import identification is Clang 20.0.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/hoffman/Work/llvm/llvm-inst/bin/clang++ - skipped -- Detecting0 码力 | 77 页 | 9.07 MB | 5 月前3How to Build Your First C++ Automated Refactoring Tool - CppCon 2023
1● Who Am I ● Refactoring Tooling Use Cases ● Clang Crash Course ● Writing a Clang Tidy Check Live ● Special Thanks & Questions Agenda 2Who Am I 01 3Proprietary + Confidential C++ Core Libraries Get Ants 17Clang Tidies! 03 18 18What is a Clang Tidy 19 19Existing Clang Tidies 20 20Existing Clang Tidies 21 21Existing Clang Tidies 22 22Existing Clang Tidies 23 23Existing Clang Tidies 24 24Existing 24Existing Clang Tidies 25 25Existing Clang Tidies 26 26I Want My Own! 27 27Proprietary + Confidential Anatomy of a Clang Tidy class AwesomeFunctionNamesCheck : public ClangTidyCheck { public:0 码力 | 83 页 | 6.03 MB | 5 月前3Quantifying Accidental Complexity: An empirical look at teaching and using C++
Sutter & Alexandrescu: C++ Coding Standards (in progress) PVS-Studio CERT: CERT standard checks Clang: clang-tidy checks Lockheed-Martin & Stroustrup: Joint Strike Fighter Air Vehicle coding std. for C++ using C++ Herb Sutter 9/21/2020 18 37 Prototype implemented by Andrew Sutton (Lock3 Software) Clang-based prototype available at cppx.godbolt.org and hosted with thanks by Matt Godbolt (Aquatic) of use-after- free/invalid Prototype MSVC, Clang Product/spec adoption Guidelines MSVC Clang WG21 encouraged n/a Next steps Continue Clang upstreaming (& WG21?) cppx.godbolt.org Simplification:0 码力 | 36 页 | 2.68 MB | 5 月前3MACRO-FREE TESTING WITH C++20
HTTPS://GITHUB.COM/BOOST-EXT/UT HTTPS://GITHUB.COM/BOOST-EXT/UT GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ MSVC-2019+* MSVC-2019+* 2 / 14UT - UT - C++20 ( C++20 ( HTTPS://GITHUB.COM/BOOST-EXT/UT HTTPS://GITHUB.COM/BOOST-EXT/UT GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ MSVC-2019+* MSVC-2019+* HEADER/MODULE HEADER/MODULE 2 / 14UT HTTPS://GITHUB.COM/BOOST-EXT/UT HTTPS://GITHUB.COM/BOOST-EXT/UT GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ GCC-9+, CLANG-9.0+, APPLE CLANG-11.0.0+ MSVC-2019+* MSVC-2019+* HEADER/MODULE HEADER/MODULE 2 / 14UT0 码力 | 53 页 | 1.98 MB | 5 月前3Cetting Started with C++
Can Help You Code More Efficiently in C++ CppCon 2022 - What’s New for You in Visual Studio Code: Clang-Tidy, makefile, CMake, GitHub and More CppCon 2021 - Debugging Assembly Language and GPU Kernels gccThe Big 3 – Compiler ToolchainsThe Big 3 – Compiler Toolchains Clang/LLVMThe Big 3 – Compiler Toolchains Clang/LLVM clang / clang++ Creates object files (.o) lld Creates executables and shared developer “step” through code libc++ Standard library implementationThe Big 3 – Compiler Toolchains Clang/LLVM https://github.com/llvm/llvm-project/releases Building from source Repository git clone https://github0 码力 | 95 页 | 4.71 MB | 5 月前3
共 101 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
相关搜索词
LLVMRealtimeSafetyRevolutionToolsforModernMissionCriticalSystems2020TheYearofSanitizersExtendingandSimplifyingC++ThoughtsonPatternMatchingusingisasCanbe10xSimplerSaferJustInTimeCompilationNextBigThingHiddenOverheadFunctionAPIMasteringModulesHowtoBuildYourFirstAutomatedRefactoringToolCppCon2023QuantifyingAccidentalComplexityAnempiricallookatteachingMACROFREETESTINGWITH20CettingStartedwith