Skip to content

Commit 197b24a

Browse files
[SYCL] Use qualified name of template function (#1062)
To disambiguate the function call. Signed-off-by: Sergey V Maslov <[email protected]>
1 parent fadaa59 commit 197b24a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

sycl/include/CL/sycl/detail/pi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ template <typename Arg0, typename... Args>
163163
void printArgs(Arg0 arg0, Args... args) {
164164
std::cout << " ";
165165
print(arg0);
166-
printArgs(std::forward<Args>(args)...);
166+
pi::printArgs(std::forward<Args>(args)...);
167167
}
168168
} // namespace pi
169169

sycl/test/regression/print_args.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %clangxx -fsycl %s -c
2+
3+
// Regression tests for https://github.com/intel/llvm/issues/1011
4+
// Checks that SYCL headers call internal templated function 'printArgs'
5+
// with fully quilified name to not confuse ADL.
6+
//
7+
8+
template <typename TArg0, typename... TArgs>
9+
auto printArgs(TArg0 arg, TArgs... args) {
10+
}
11+
12+
#include <CL/sycl.hpp>
13+
14+
int main() {
15+
return 0;
16+
}

0 commit comments

Comments
 (0)