Skip to content

Commit 4a86570

Browse files
committed
Added escaping for backslashes in #line directives, closes hsutter#8
1 parent f6c7583 commit 4a86570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/cppfront.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class positional_printer
226226

227227
// Not using print() here because this is transparent to the curr_pos
228228
if (!flag_clean_cpp1) {
229-
out << "#line " << line << " \"" << filename << "2\"\n";
229+
out << "#line " << line << " " << std::quoted(filename + "2") << "\n";
230230
}
231231
}
232232

0 commit comments

Comments
 (0)