[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 20 06:49:57 PST 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Aside from some small nits, LGTM!



================
Comment at: docs/ReleaseNotes.rst:53
 
+- ``-Wextra-semi-stmt`` is a new diagnostic, which is, much like
+  ``-Wextra-semi``, diagnoses extra semicolons. This new diagnostic
----------------
aaron.ballman wrote:
> , which is, much like `-Wextra-semi`, diagnoses extra semicolons. -> that diagnoses extra semicolons, much like `-Wextra-semi`.
diagnostic, that -> diagnostic that


================
Comment at: docs/ReleaseNotes.rst:93
+  of ``if``, ``switch``, ``range-based for``, unless: the semicolon directly
+  follows a macro that was expanded nothing or if the semicolon is within the
+  macro itself (both macros from system headers, and normal macros). This
----------------
expanded nothing -> expanded to nothing


================
Comment at: include/clang/Basic/DiagnosticParseKinds.td:57
+def warn_null_statement : Warning<
+  " empty expression statement has no effect; "
+  "remove unnecessary ';' to silence this warning">,
----------------
Spurious whitespace at the start of the diagnostic text.


Repository:
  rC Clang

https://reviews.llvm.org/D52695





More information about the cfe-commits mailing list