File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -2845,11 +2845,9 @@ class SYCLKernelNameTypeVisitor
2845
2845
bool isValid () { return !IsInvalid; }
2846
2846
2847
2847
bool Visit (QualType T) {
2848
- if (T.isNull ())
2849
- return false ;
2848
+ assert (!T.isNull () && " KernelNameType cannot be null" );
2850
2849
const CXXRecordDecl *RD = T->getAsCXXRecordDecl ();
2851
- if (!RD)
2852
- return false ;
2850
+ assert (RD && " KernelNameType is not a record" );
2853
2851
// If KernelNameType has template args visit each template arg via
2854
2852
// ConstTemplateArgumentVisitor
2855
2853
if (const auto *TSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
@@ -2864,8 +2862,7 @@ class SYCLKernelNameTypeVisitor
2864
2862
}
2865
2863
2866
2864
bool Visit (const TemplateArgument &TA) {
2867
- if (TA.isNull ())
2868
- return false ;
2865
+ assert (!TA.isNull () && " TemplateArgument cannot be null" );
2869
2866
return InnerTAVisitor::Visit (TA);
2870
2867
}
2871
2868
@@ -2917,8 +2914,7 @@ class SYCLKernelNameTypeVisitor
2917
2914
QualType T = TA.getAsType ();
2918
2915
if (const auto *ET = T->getAs <EnumType>())
2919
2916
return VisitEnumType (ET);
2920
- else
2921
- return Visit (T);
2917
+ return Visit (T);
2922
2918
}
2923
2919
2924
2920
bool VisitIntegralTemplateArgument (const TemplateArgument &TA) {
You can’t perform that action at this time.
0 commit comments