[clang] effe799 - [CUDA] remove duplicate condition
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 22 08:27:47 PDT 2022
Author: VitalyR
Date: 2022-07-22T11:27:19-04:00
New Revision: effe79993f8e0bd13181fcf660a47ed7044a83c3
URL: https://github.com/llvm/llvm-project/commit/effe79993f8e0bd13181fcf660a47ed7044a83c3
DIFF: https://github.com/llvm/llvm-project/commit/effe79993f8e0bd13181fcf660a47ed7044a83c3.diff
LOG: [CUDA] remove duplicate condition
Reviewed by: Yaxun Liu
Differential Revision: https://reviews.llvm.org/D130168
Change-Id: Ia00c3dfa9ea20e61235817fd4bb61d33c7c98a60
Added:
Modified:
clang/lib/Sema/SemaCUDA.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp
index 185ccebe2717c..0a49d72ba9634 100644
--- a/clang/lib/Sema/SemaCUDA.cpp
+++ b/clang/lib/Sema/SemaCUDA.cpp
@@ -714,7 +714,7 @@ void Sema::MaybeAddCUDAConstantAttr(VarDecl *VD) {
// Do not promote dependent variables since the cotr/dtor/initializer are
// not determined. Do it after instantiation.
if (getLangOpts().CUDAIsDevice && !VD->hasAttr<CUDAConstantAttr>() &&
- !VD->hasAttr<CUDAConstantAttr>() && !VD->hasAttr<CUDASharedAttr>() &&
+ !VD->hasAttr<CUDASharedAttr>() &&
(VD->isFileVarDecl() || VD->isStaticDataMember()) &&
!IsDependentVar(VD) &&
((VD->isConstexpr() || VD->getType().isConstQualified()) &&
More information about the cfe-commits
mailing list