diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-05 18:03:55 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-05 18:03:55 +0000 |
| commit | 43cfcbca3f4008db36af4d0683f8a9258a20097f (patch) | |
| tree | ff9d57b217912380726bbfe42c630a7363c107e3 /clang/lib | |
| parent | 63035ebee1dc118aa04f0c38cfddd68695bd297c (diff) | |
| download | bcm5719-llvm-43cfcbca3f4008db36af4d0683f8a9258a20097f.tar.gz bcm5719-llvm-43cfcbca3f4008db36af4d0683f8a9258a20097f.zip | |
Use else if when checking multiple attributes.
Only one of these can really match.
llvm-svn: 223489
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index e5eb61c1eb4..af7cf5713de 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -4764,12 +4764,10 @@ void Sema::ProcessDeclAttributeList(Scope *S, Decl *D, if (Attr *A = D->getAttr<ReqdWorkGroupSizeAttr>()) { Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A; D->setInvalidDecl(); - } - if (Attr *A = D->getAttr<WorkGroupSizeHintAttr>()) { + } else if (Attr *A = D->getAttr<WorkGroupSizeHintAttr>()) { Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A; D->setInvalidDecl(); - } - if (Attr *A = D->getAttr<VecTypeHintAttr>()) { + } else if (Attr *A = D->getAttr<VecTypeHintAttr>()) { Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A; D->setInvalidDecl(); } |

