[PATCH] Add warnings so that Clang can catch most of the cases that GCC's -Waddress can catch

Richard Trieu rtrieu at google.com
Wed Feb 19 11:36:56 PST 2014

Comment at: lib/Sema/SemaChecking.cpp:5698
@@ +5697,3 @@
+/// \param Range Extra SourceRange to highlight in the diagnostic
+void Sema::DiagnosePointer(Expr *E, Expr::NullPointerConstantKind NullKind,
+                           bool IsEqual, SourceRange Range) {
David Majnemer wrote:
> `DiagnosePointer` is rather vague, perhaps something like `diagnoseTautologicalPointerCompare` ?
Tautological compare is only half of the warnings generated.  There are also pointer to bool conversion warnings here too.


More information about the cfe-commits mailing list