[all-commits] [llvm/llvm-project] c873f7: [analyzer] Move alpha checker EnumCastOutOfRange t...
DonatNagyE via All-commits
all-commits at lists.llvm.org
Tue Dec 12 07:29:50 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c873f77e87a9ebd02f94d6b9d46e84d43e1ceb38
https://github.com/llvm/llvm-project/commit/c873f77e87a9ebd02f94d6b9d46e84d43e1ceb38
Author: DonatNagyE <donat.nagy at ericsson.com>
Date: 2023-12-12 (Tue, 12 Dec 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/docs/analyzer/checkers.rst
M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
M clang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
M clang/test/Analysis/enum-cast-out-of-range.c
M clang/test/Analysis/enum-cast-out-of-range.cpp
M clang/www/analyzer/alpha_checks.html
Log Message:
-----------
[analyzer] Move alpha checker EnumCastOutOfRange to optin (#67157)
The checker EnumCastOutOfRange verifies the (helpful, but not
standard-mandated) design rule that integer to enum casts should not
produce values that don't have a corresponding enumerator. As it was
improved and cleaned up by recent changes, this commit renames it from
`alpha.cplusplus.EnumCastOutOfRange` to `optin.core.EnumCastOutOfRange`
to reflect that it's no longer alpha quality.
As this checker handles a basic language feature (which is also present
in plain C), I moved it to a "core" subpackage within "optin".
In addition to the renaming, this commit cleans up the documentation in
`checkers.rst` and adds the new example code to a test file to ensure
that it's indeed producing the behavior claimend in the documentation.
More information about the All-commits
mailing list