| commit | ec96c0c072ef3f78813c378949c00e1c07aa44e5 | [log] [tgz] |
|---|---|---|
| author | DonĂ¡t Nagy <donat.nagy@ericsson.com> | Tue Jun 03 14:19:02 2025 +0200 |
| committer | GitHub <noreply@github.com> | Tue Jun 03 14:19:02 2025 +0200 |
| tree | 468088086a58e83b01f0ba0d0e4db6f5801c3e1a | |
| parent | 3ddc1e1cf397bd495f5aa42b04630561a9e6bf47 [diff] |
[analyzer] Fix tagging of PostAllocatorCall (#142132) By design the `Location` data member of a `CheckerContext` is always a `ProgramPoint` which is tagged with the currently active checker (note that all checker classes are subclasses of `ProgramPointTag`). This ensures that exploded nodes created by the checker are by default tagged by the checker object unless the checker specifies some other tag (e.g. a note tag) when it calls the `addTransition`-like method that creates the node. This was followed by all the `CheckerManager::runCheckersForXXX` methods, except for `runCheckerForNewAllocator`, where the implementation constructed the `PostAllocatorCall` program point which was used to create the `CheckerContext` without passing `checkFn.Checker` as the tag of the program point. This commit elimintates this inconsistency and adds an assertion to the constructor of `CheckerContext` to ensure that this invariant will be upheld even if we e.g. add a new program point kind. I strongly suspect that this is a non-functional change because program point tags are a vestigial feature in the codebase that barely affect anything -- but e.g. their presence affects the infamous node reclamation process, so I'm not marking this as NFC.
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.