diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-19 11:51:05 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-19 11:51:05 +0000 |
| commit | f34eea5aa1bcd7182afd3f96b30344e6045f5d7b (patch) | |
| tree | b2d14ecc5a9d97655db2ff074c8f227061f5e85e | |
| parent | 4feda80a438420d16378f0092596a833c78ba176 (diff) | |
| download | bcm5719-llvm-f34eea5aa1bcd7182afd3f96b30344e6045f5d7b.tar.gz bcm5719-llvm-f34eea5aa1bcd7182afd3f96b30344e6045f5d7b.zip | |
[YAML] Always double quote UTF-8 characters
llvm-svn: 321068
| -rw-r--r-- | llvm/include/llvm/Support/YAMLTraits.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h index 83b097a199d..3ee556d7533 100644 --- a/llvm/include/llvm/Support/YAMLTraits.h +++ b/llvm/include/llvm/Support/YAMLTraits.h @@ -549,9 +549,9 @@ inline QuotingType needsQuotes(StringRef S) { // range. if (C <= 0x1F) return QuotingType::Double; - // C1 control block (0x80 - 0x9F) is excluded from the allowed character - // range. - if (C >= 0x80 && C <= 0x9F) + + // Always double quote UTF-8. + if (C & 0x80 != 0) return QuotingType::Double; // The character is not safe, at least simple quoting needed. |

