[clang] [analyzer] Add std::variant checker (PR #66481)
Gábor Spaits via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 21 03:10:24 PDT 2023
spaits wrote:
Thank you for your time and effort for editing my commit @Szelethus and for reviewing my commit @DonatNagyE @steakhal .
I have edited my commit based on your comments. These are the thing I have added or changed:
+ Added a function to decide 'a' or 'an' should be used in the reports.
+ Added test cases to verify that the
an std::variant holds a std::variant is handled well `variantHoldingVariant`,
a multiple active type changes are handled well `typeChangeThreeTimes`, `assignmentOperator`.
+ Replaced `std::string` to `StringRef` wherever I found that possible
+ Removed the IIFEs that made code readability worse.
+ Removed `assert`s and `llvm_unreachable` where it was used improperly to "test" the correctness of input.
+ Used llvm coding conventions (hopefully everywhere)
+ Using `dyn_cast_or_null` instead of checking for `nullptr` and then casting.
+ Spell checking and correcting sentences that were not clear or misguiding.
https://github.com/llvm/llvm-project/pull/66481
More information about the cfe-commits
mailing list