T O P I C R E V I E W |
phineasphred |
Posted - Jun 27 2023 : 12:45:00 PM Does VA have a way to check for uninitialized variables in C++ code? |
1 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jul 05 2023 : 11:09:47 AM If you turn On the option:
VA Options -> Code Inspection -> Show Unevaluated Checkers
you can now filter the list of Code Inspection checkers with the string "uninitialized", which is bringing up 8 entries for me. Without looking up the details of how these work I am not sure how much they will help, but "Check for blocks that capture uninitialized values" sounds interesting. Unfortunately the documentation for this check is a little sparse:
https://clang.llvm.org/extra//clang-tidy/checks/clang-analyzer/core.uninitialized.CapturedBlockVariable.html
which is to say completely empty. So you will have to have a go and see how much help these checks are.
You may also want to make sure that the Code Inspection:
Find manually-defined constructor definitions that do not initialize all fields
is enabled since this will help. |
|
|