The repro in https://bugs.llvm.org/show_bug.cgi?id=34362
caused the left nullptr to be cast to a int* implicitly, which
resulted diagnosing this falsely.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/SemaCXX/warn-zero-nullptr.cpp | ||
---|---|---|
29 ↗ | (On Diff #120286) | Maybe wrap into a namespace PR34362 {} |
lib/Sema/Sema.cpp | ||
---|---|---|
441 ↗ | (On Diff #120288) | Do we also want to ignore parens here as well with Expr::IgnoreParenImpCasts()? |
lib/Sema/Sema.cpp | ||
---|---|---|
441 ↗ | (On Diff #120288) | I don't see a reason why not! Patch incoming. |
lib/Sema/Sema.cpp | ||
---|---|---|
441 ↗ | (On Diff #120288) | Probably needs a test too :) |
Comment Actions
Awesome, thanks much! Like lebedev.ri says, adding a test for the "Parens" part would be good.
Comment Actions
They've got me presenting in the next meeting, but i'll add said test and commit after. Thanks for the reviews guys!
Comment Actions
I agree. I should have been more explicit with my LGTM, but I presumed you knew to add the tests already. ;-)