forked from OSchip/llvm-project
[sanitizer] Treat \r, \n, \t as flag separators.
llvm-svn: 224858
This commit is contained in:
parent
ef0f244594
commit
9e609426a7
|
@ -216,7 +216,7 @@ static bool GetFlagValue(const char *env, const char *name,
|
|||
end = internal_strchr(pos, '\'');
|
||||
} else {
|
||||
// Read until the next space or colon.
|
||||
end = pos + internal_strcspn(pos, " :");
|
||||
end = pos + internal_strcspn(pos, " :\r\n\t");
|
||||
}
|
||||
if (end == 0)
|
||||
end = pos + internal_strlen(pos);
|
||||
|
|
|
@ -81,6 +81,9 @@ TEST(SanitizerCommon, MultipleFlags) {
|
|||
TestTwoFlags("flag2='qxx' flag1=0", false, "qxx");
|
||||
TestTwoFlags("flag1=false:flag2='zzz'", false, "zzz");
|
||||
TestTwoFlags("flag2=qxx:flag1=yes", true, "qxx");
|
||||
TestTwoFlags("flag2=qxx\nflag1=yes", true, "qxx");
|
||||
TestTwoFlags("flag2=qxx\r\nflag1=yes", true, "qxx");
|
||||
TestTwoFlags("flag2=qxx\tflag1=yes", true, "qxx");
|
||||
}
|
||||
|
||||
TEST(SanitizerCommon, CommonFlags) {
|
||||
|
|
Loading…
Reference in New Issue