Skip to content

Commit 6f5f4a8

Browse files
committed
Fix regex escape sequence
1 parent 3e7e027 commit 6f5f4a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

amd/hipcc/src/hipBin_amd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ void HipBinAmd::executeHipCCCmd(vector<string> argv) {
726726
// Important to have all of '-Xlinker' in the set of unquoted characters.
727727
// Windows needs different quoting, ignore for now
728728
if (os != windows && escapeArg) {
729-
regex reg("[^-a-zA-Z0-9_=+,.\/]");
729+
regex reg("[^-a-zA-Z0-9_=+,.\\/]");
730730
arg = regex_replace(arg, reg, "\\$&");
731731
}
732732
if (!swallowArg)

amd/hipcc/src/hipBin_nvidia.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ void HipBinNvidia::executeHipCCCmd(vector<string> argv) {
538538
}
539539
// Windows needs different quoting, ignore for now
540540
if (os != windows && escapeArg) {
541-
regex reg("[^-a-zA-Z0-9_=+,.\/]");
541+
regex reg("[^-a-zA-Z0-9_=+,.\\/]");
542542
arg = regex_replace(arg, reg, "\\$&");
543543
}
544544
if (!swallowArg)

0 commit comments

Comments
 (0)