Skip to content

Commit aa048b8

Browse files
authored
Fix escape in Python string in lit.cfg (microsoft#6826)
Change Python regexp ' clang\+\+ ' to ' clang\\+\\+' We're trying to match fixed strings like ` clang++ `, but `\+` is not a valid Python escape sequence. Use `\\+` so the regexp machinery sees `\+`
1 parent 716e741 commit aa048b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/clang/test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ else:
308308
config.substitutions.append(
309309
(' clang ', """*** Do not use 'clang' in tests, use '%clang'. ***""") )
310310
config.substitutions.append(
311-
(' clang\+\+ ', """*** Do not use 'clang++' in tests, use '%clangxx'. ***"""))
311+
(' clang\\+\\+ ', """*** Do not use 'clang++' in tests, use '%clangxx'. ***"""))
312312
config.substitutions.append(
313313
(' clang-cc ',
314314
"""*** Do not use 'clang-cc' in tests, use '%clang_cc1'. ***""") )

0 commit comments

Comments
 (0)