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