[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)
Chris Warner via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 10:04:39 PDT 2024
cwarner-8702 wrote:
@PiotrZSL Ok. I was hoping that since this new option is _only_ used by the `clang-tidy` check, that it's tests would suffice. But I would also like to have more assurance than that.
I need some help figuring out how to go about testing the change to the `Expr` class itself. It isn't something that would affect the AST itself, so isn't something that will show up on an AST-dump, like many/all of the tests in `clang/test/AST` use for validation.
What would be easiest if if there was a test context like Gtest which calls into the code itself from a test, rather than `lit` which examines artifacts from running a piece of code through LLVM. When I run `check-clang-tools` build target, there does seem to be a Gtest suite run _somewhere_. Does anyone know what that is, and if that's an option?
The only other thing I can think of is adding a new diagnostic that can be detected by `lit`, which... is a larger scope than I was hoping to keep this change to.
Is there some other novel way of testing `clang` internals I don't know about, or methodology I'm not thinking of right now?
https://github.com/llvm/llvm-project/pull/101073
More information about the cfe-commits
mailing list