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

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 15:58:53 PDT 2019


Rakete1111 added inline comments.


================
Comment at: clang/include/clang/AST/DeclCXX.h:2579
+    assert(
+        !ES.getExpr() ||
+        CXXConstructorDeclBits.HasTrailingExplicitSpecifier &&
----------------
Your or needs parens or the disambiguation is wrong.


================
Comment at: clang/include/clang/Serialization/ASTReader.h:2435
+    uint64_t Kind = readInt();
+    bool hasExpr = Kind & 0x1;
+    Kind = Kind >> 1;
----------------
same here.


================
Comment at: clang/lib/Sema/DeclSpec.cpp:952
+          ExplicitSpec.getExpr()) &&
+         "invalide ExplicitSpecifier");
   // 'explicit explicit' is ok, but warn as this is likely not what the user
----------------
typo.


================
Comment at: clang/test/CXX/temp/temp.deduct.guide/p1.cpp:74
 virtual A(int(&)[28]) -> A<int>; // expected-error {{'virtual' can only appear on non-static member functions}}
-const A(int(&)[28]) -> A<int>; // expected-error {{deduction guide cannot be declared 'const'}}
+const A(int(&)[31]) -> A<int>; // expected-error {{deduction guide cannot be declared 'const'}}
 
----------------
Is there a reason why you changed this?


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

https://reviews.llvm.org/D60934





More information about the cfe-commits mailing list