[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)
Jan Voung via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 11:42:54 PST 2024
jvoung wrote:
Thanks! Ok that does that look useful (and I think the our other reviewer ymand@ wrote it =) https://reviews.llvm.org/D74840).
- I'll work on using those in parallel
- It will need to be extended a little to handle a few more matches (right now it's the binary comparison eq/ne, etc. not unary EXPECT_TRUE that is more common for optional)
- Handle enough of the cases EXPECT_TRUE, EXPECT_EQ, EXPECT_NE, EXPECT_THAT...
- Do some analysis on our false positive data to see what else remains. We have some data already of other issues besides macros, like state carried over from constructors. There may be cases still where we just can't reduce the FP (developers making shortcuts not doing the check, assuming that running the test will catch the issue)
In the meantime, I updated the patch to make an option that is off by default. For all other users the behavior is unchanged, but we can opt in on our side.
Can we add the option to use in the meantime, while I work on the macro handling in parallel?
Thanks!
https://github.com/llvm/llvm-project/pull/115051
More information about the cfe-commits
mailing list