Skip to content

Commit 7c78048

Browse files
[SYCL] remove unused class field (#17970)
This PR is quick fix to avoid error clang/lib/Sema/SemaSYCL.cpp:6584:25: error: private field 'Policy' is not used [-Werror,-Wunused-private-field]
1 parent 15f00b8 commit 7c78048

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6491,12 +6491,10 @@ static void PrintNSClosingBraces(raw_ostream &OS, const DeclContext *DC) {
64916491

64926492
class FreeFunctionPrinter {
64936493
raw_ostream &O;
6494-
const PrintingPolicy &Policy;
64956494
bool NSInserted = false;
64966495

64976496
public:
6498-
FreeFunctionPrinter(raw_ostream &O, const PrintingPolicy &Policy)
6499-
: O(O), Policy(Policy) {}
6497+
FreeFunctionPrinter(raw_ostream &O) : O(O) {}
65006498

65016499
/// Emits the function declaration of a free function.
65026500
/// \param FD The function declaration to print.
@@ -6878,7 +6876,7 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
68786876
// template arguments that match default template arguments while printing
68796877
// template-ids, even if the source code doesn't reference them.
68806878
Policy.EnforceDefaultTemplateArgs = true;
6881-
FreeFunctionPrinter FFPrinter(O, Policy);
6879+
FreeFunctionPrinter FFPrinter(O);
68826880
if (FTD) {
68836881
FTD->print(O, Policy);
68846882
O << ";\n";

0 commit comments

Comments
 (0)