[llvm] r321068 - [YAML] Always double quote UTF-8 characters
Francis Visoiu Mistrih via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 03:51:05 PST 2017
Author: thegameg
Date: Tue Dec 19 03:51:05 2017
New Revision: 321068
URL: http://llvm.org/viewvc/llvm-project?rev=321068&view=rev
Log:
[YAML] Always double quote UTF-8 characters
Modified:
llvm/trunk/include/llvm/Support/YAMLTraits.h
Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Tue Dec 19 03:51:05 2017
@@ -549,9 +549,9 @@ inline QuotingType needsQuotes(StringRef
// 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.
More information about the llvm-commits
mailing list