I assume it's optional and ReadAST does not have to set the
counter on success.
Without the patch msan complains that we pass
uninitialized value into noundef parameters of setCounterValue.
Paths
| Differential D150492
[AST] Initialize local counter ClosedPublic Authored by vitalybuka on May 12 2023, 3:21 PM.
Details
Summary I assume it's optional and ReadAST does not have to set the Without the patch msan complains that we pass
Diff Detail
Event Timelinevitalybuka retitled this revision from [AST] Initialized local counter to [AST] Initialize local counter. Comment Actions Not my area, but the change is trivial. Nit: could move the variable closer to its use. This revision is now accepted and ready to land.May 16 2023, 4:06 PM Closed by commit rGe8cd04624e50: [AST] Initialize local counter (authored by vitalybuka). · Explain WhyMay 18 2023, 1:19 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 523292 clang/lib/Frontend/ASTUnit.cpp
|
Looks like we only write the counter value when it's non-zero. So the reader would never set it. Thanks for fixing!