[PATCH] D60934: [clang] adding explicit(bool) from c++2a

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 1 12:23:47 PDT 2019


Rakete1111 added inline comments.


================
Comment at: clang/include/clang/AST/DeclCXX.h:2579
+    assert(
+        !ES.getExpr() ||
+        CXXConstructorDeclBits.HasTrailingExplicitSpecifier &&
----------------
Tyker wrote:
> Rakete1111 wrote:
> > Your or needs parens or the disambiguation is wrong.
> i don't understand. but there is no need for disambiguation, `a && true == a` so this will work regardless of operator priority.
Yeah sorry you're right, I meant that the parens are needed to shut up -Wparens warning about disambiguation.


================
Comment at: clang/include/clang/Serialization/ASTReader.h:2435
+    uint64_t Kind = readInt();
+    bool hasExpr = Kind & 0x1;
+    Kind = Kind >> 1;
----------------
Tyker wrote:
> Rakete1111 wrote:
> > same here.
> what is the issue
> For consistency with nearby code, please name this variable starting with a capital letter.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60934/new/

https://reviews.llvm.org/D60934





More information about the cfe-commits mailing list