[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 2 12:21:02 PDT 2018
lebedev.ri updated this revision to Diff 168000.
lebedev.ri marked 4 inline comments as done.
lebedev.ri added a comment.
Thank you for taking a look!
- Move it into `ParseCompoundStatementBody()`, thus fixing false-positives with `case X: ;` e.g.
- Rename to `-Wextra-semi-stmt`
- Add `-Wempty-init-stmt` (tentatively included into `-Wextra` too), to diagnose empty init-statements of `if`/`switch`/`range-based for`
Repository:
rC Clang
https://reviews.llvm.org/D52695
Files:
docs/ReleaseNotes.rst
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseStmt.cpp
test/Parser/extra-semi-resulting-in-nullstmt.cpp
test/SemaCXX/extra-semi-resulting-in-nullstmt-in-init-statement.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52695.168000.patch
Type: text/x-patch
Size: 9857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/9fb4126b/attachment.bin>
More information about the cfe-commits
mailing list