Closed Bug 1473453 (clang-bool-pointer-implicit-conversion) Opened 2 years ago Closed 2 years ago

Fix and enable clang-tidy's bool-pointer-implicit-conversion warnings

Categories

(Core :: General, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

clang-tidy's bool-pointer-implicit-conversion checks for conditions based on implicit conversion from a bool pointer to bool.

  bool* pointer_to_bool;
  if (pointer_to_bool) { // warning: did you mean *pointer_to_bool?
  }

https://clang.llvm.org/extra/clang-tidy/checks/bugprone-bool-pointer-implicit-conversion.html
Attachment #8989896 - Flags: review?(surkov.alexander) → review?(mzehe)
Comment on attachment 8989896 [details]
Bug 1473453 - Part 1: a11y: assert `hitregion` property is always null or true.

https://reviewboard.mozilla.org/r/254890/#review261750

Stealing review from Surkov since he's on PTO until end of next week. r=marcoz.
Attachment #8989896 - Flags: review?(mzehe) → review+
Comment on attachment 8989898 [details]
Bug 1473453 - Part 3: Enable clang-tidy's misc-bool-pointer-implicit-conversion warning.

https://reviewboard.mozilla.org/r/254894/#review261762
Attachment #8989898 - Flags: review?(bpostelnicu) → review+
(In reply to Marco Zehe (:MarcoZ) from comment #4)
> Stealing review from Surkov since he's on PTO until end of next week.
> r=marcoz.

Thanks! :)
Comment on attachment 8989897 [details]
Bug 1473453 - Part 2: QuotaManager: disambiguate null check of bool pointer.

https://reviewboard.mozilla.org/r/254892/#review262874

Ok.
Attachment #8989897 - Flags: review?(jvarga) → review+
Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f496f2f11ef
Part 1: a11y: assert `hitregion` property is always null or true. r=MarcoZ
https://hg.mozilla.org/integration/autoland/rev/fb7269b3d9b2
Part 2: QuotaManager: disambiguate null check of bool pointer. r=janv
https://hg.mozilla.org/integration/autoland/rev/146466f1d08a
Part 3: Enable clang-tidy's misc-bool-pointer-implicit-conversion warning. r=andi
Bravo, thanks for doing that!
You need to log in before you can comment on or make changes to this bug.