[PATCH] D57984: PR40642: Fix determination of whether the final statement of a statementexpression is a discarded-value expression.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 13 09:34:26 PST 2019
ABataev added inline comments.
================
Comment at: include/clang/Parse/Parser.h:382
+
+ friend ParsedStmtContext operator|(ParsedStmtContext A, ParsedStmtContext B) {
+ return ParsedStmtContext((unsigned)A | (unsigned)B);
----------------
We have `llvm/ADT/BitmaskEnum.h`, which defines `LLVM_MARK_AS_BITMASK_ENUM` for the bitwise ops on the enums. Maybe it is better to use it rather than manually define the required operations?
================
Comment at: lib/CodeGen/CGStmt.cpp:401
+ break;
+ } else if (const LabelStmt *LS = dyn_cast<LabelStmt>(LastStmt)) {
+ EmitLabel(LS->getDecl());
----------------
You don't need `else if` here, just ]ша] is enough since there is `break;` in the previous substatement.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57984/new/
https://reviews.llvm.org/D57984
More information about the cfe-commits
mailing list