Skip to content

Commit a16091a

Browse files
committed
Corrected file upload.
1 parent 97ddadb commit a16091a

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <array>
3030
#include <functional>
3131
#include <initializer_list>
32-
#include <iostream>
3332

3433
using namespace clang;
3534
using namespace std::placeholders;
@@ -930,29 +929,25 @@ class SyclKernelFieldChecker
930929
bool isValid() { return !IsInvalid; }
931930

932931
bool handleReferenceType(FieldDecl *FD, QualType FieldTy) final {
933-
bool bad = Diag.Report(FD->getLocation(), diag::err_bad_kernel_param_type)
934-
<< FieldTy;
935-
IsInvalid |= bad;
936-
return !bad;
932+
Diag.Report(FD->getLocation(), diag::err_bad_kernel_param_type) << FieldTy;
933+
IsInvalid = true;
934+
return isValid();
937935
}
938936

939937
bool handleStructType(FieldDecl *FD, QualType FieldTy) final {
940-
bool bad = checkNotCopyableToKernel(FD, FieldTy);
941-
IsInvalid |= bad;
942-
return !bad;
938+
IsInvalid |= checkNotCopyableToKernel(FD, FieldTy);
939+
return isValid();
943940
}
944941

945942
bool handleArrayType(FieldDecl *FD, QualType FieldTy) final {
946-
bool bad = checkNotCopyableToKernel(FD, FieldTy);
947-
IsInvalid |= bad;
948-
return !bad;
943+
IsInvalid |= checkNotCopyableToKernel(FD, FieldTy);
944+
return isValid();
949945
}
950946

951947
bool handleOtherType(FieldDecl *FD, QualType FieldTy) final {
952-
bool bad = Diag.Report(FD->getLocation(), diag::err_bad_kernel_param_type)
953-
<< FieldTy;
954-
IsInvalid |= bad;
955-
return !bad;
948+
Diag.Report(FD->getLocation(), diag::err_bad_kernel_param_type) << FieldTy;
949+
IsInvalid = true;
950+
return isValid();
956951
}
957952
};
958953

@@ -2278,13 +2273,7 @@ SYCLIntegrationHeader::SYCLIntegrationHeader(DiagnosticsEngine &_Diag,
22782273
// -----------------------------------------------------------------------------
22792274

22802275
bool Util::isSyclAccessorType(const QualType &Ty) {
2281-
std::cerr << "isSyclAccessorType:Ty\n";
2282-
Ty->dump();
2283-
bool b = isSyclType(Ty, "accessor", true /*Tmpl*/) || isSyclType(Ty, "accessor_common", true /*Tmpl*/);
2284-
std::cerr << (b ? "IS"
2285-
: "NOT")
2286-
<< " an accessor\n\n";
2287-
return b;
2276+
return isSyclType(Ty, "accessor", true /*Tmpl*/);
22882277
}
22892278

22902279
bool Util::isSyclSamplerType(const QualType &Ty) {

0 commit comments

Comments
 (0)