Revert assertion added by r372394
authorYaxun Liu <Yaxun.Liu@amd.com>
Sat, 21 Sep 2019 02:51:44 +0000 (02:51 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Sat, 21 Sep 2019 02:51:44 +0000 (02:51 +0000)
The assertion added by r372394 causes CUDA test in test-suite to assert.

The assertion was not there originally, so revert it.

llvm-svn: 372452

clang/lib/Sema/SemaCUDA.cpp

index e009dcb..cf8910c 100644 (file)
@@ -396,7 +396,6 @@ bool Sema::inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl,
 
   // We either setting attributes first time, or the inferred ones must match
   // previously set ones.
-  assert(!(HasD || HasH) || (NeedsD == HasD && NeedsH == HasH));
   if (NeedsD && !HasD)
     MemberDecl->addAttr(CUDADeviceAttr::CreateImplicit(Context));
   if (NeedsH && !HasH)