| commit | 29436737baf8675ec98c8f738e291acb44eacd85 | [log] [tgz] |
|---|---|---|
| author | Ziqing Luo <ziqing@udel.edu> | Tue Jul 15 17:48:20 2025 +0900 |
| committer | GitHub <noreply@github.com> | Tue Jul 15 16:48:20 2025 +0800 |
| tree | e9e2458febe73727e3c0649df5e335d3eaa500bc | |
| parent | 7c30897b4cff758321d864adf1d58533eedbdb98 [diff] |
[NFC][-Wunsafe-buffer-usage] Refactor safe pattern check for pointer-size pairs (#145626)
Refactor the safe pattern analysis of pointer and size expression pairs
so that the check can be re-used in more places. For example, it can be
used to check whether the following cases are safe:
- `std::span<T>{ptr, size} // span construction`
- `snprintf(ptr, size, "%s", ...) // unsafe libc call`
- `printf("%.*s", size, ptr) // unsafe libc call`Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.