Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Uninitialized Variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

phineasphred
Starting Member

USA
1 Posts

Posted - Jun 27 2023 :  12:45:00 PM  Show Profile  Reply with Quote
Does VA have a way to check for uninitialized variables in C++ code?

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Jul 05 2023 :  11:09:47 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000