summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-19 11:51:05 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-19 11:51:05 +0000
commit25a46d2ed3927d7c96daa5887a7b7c446c4b2b64 (patch)
tree16cb1fc9af2aa68e8cb1a63df7a08719c9c2fd1b /include
parent664fc770460016049b1ab9d7e4e304231dfa6a9a (diff)
[YAML] Always double quote UTF-8 characters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/YAMLTraits.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h
index 83b097a199d..3ee556d7533 100644
--- a/include/llvm/Support/YAMLTraits.h
+++ b/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.