File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -6834,15 +6834,16 @@ class FreeFunctionPrinter {
6834
6834
auto TemplateArgPrinter = [&](const TemplateArgument &Arg) {
6835
6835
if (Arg.getKind () != TemplateArgument::ArgKind::Expression ||
6836
6836
Arg.isInstantiationDependent ()) {
6837
- Arg.print (Policy, ParmListOstream, false /* IncludeType */ );
6837
+ Arg.print (Policy, ParmListOstream, /* IncludeType = */ false );
6838
6838
return ;
6839
6839
}
6840
6840
6841
6841
Expr *E = Arg.getAsExpr ();
6842
+ assert (E && " Failed to get an Expr for an Expression template arg?" );
6842
6843
if (E->getType ().getTypePtr ()->isScopedEnumeralType ()) {
6843
6844
// Scoped enumerations can't be implicitly cast from integers, so
6844
- // we don't need to evaluate them
6845
- Arg.print (Policy, ParmListOstream, false /* IncludeType */ );
6845
+ // we don't need to evaluate them.
6846
+ Arg.print (Policy, ParmListOstream, /* IncludeType = */ false );
6846
6847
return ;
6847
6848
}
6848
6849
@@ -6861,7 +6862,7 @@ class FreeFunctionPrinter {
6861
6862
if (I != 0 )
6862
6863
ParmListOstream << " , " ;
6863
6864
// If we have a specialized argument, use it. Otherwise fallback to a
6864
- // default argument
6865
+ // default argument.
6865
6866
TemplateArgPrinter (I < SE ? SpecArgs[I] : DeclArgs[I]);
6866
6867
}
6867
6868
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ enum class class_enum_typed : int {
38
38
VAL_D
39
39
};
40
40
41
+ constexpr int bar (int arg) {
42
+ return arg + 42 ;
43
+ }
44
+
41
45
} // namespace ns
42
46
43
47
template <int V>
@@ -99,3 +103,8 @@ void constexpr_ns2(Arg4<ns::class_enum::VAL_A>) {}
99
103
void constexpr_ns2 (Arg5<ns::class_enum_typed::VAL_C>) {}
100
104
101
105
// CHECK: void constexpr_ns2(Arg5<ns::class_enum_typed::VAL_C> );
106
+
107
+ [[__sycl_detail__::add_ir_attributes_function(" sycl-nd-range-kernel" , 2 )]]
108
+ void constexpr_call (Arg<ns::bar(B)>) {}
109
+
110
+ // CHECK: void constexpr_call(Arg<45> );
You can’t perform that action at this time.
0 commit comments