mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 23:17:11 +08:00
Make sure to escape " when it occurs in a string in pragma comment
llvm-svn: 62367
This commit is contained in:
@@ -209,7 +209,7 @@ void PrintPPOutputPPCallbacks::PragmaComment(SourceLocation Loc,
|
||||
|
||||
for (unsigned i = 0, e = Str.size(); i != e; ++i) {
|
||||
unsigned char Char = Str[i];
|
||||
if (isprint(Char) && Char != '\\')
|
||||
if (isprint(Char) && Char != '\\' && Char != '"')
|
||||
OS << (char)Char;
|
||||
else // Output anything hard as an octal escape.
|
||||
OS << '\\'
|
||||
|
||||
Reference in New Issue
Block a user