summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorgerim <georgerim@gmail.com>2019-10-26 14:52:12 +0300
committergeorgerim <georgerim@gmail.com>2019-10-26 14:52:12 +0300
commit05a9e344ee35f3b5989df5b95c80a2955389cbbb (patch)
tree4a1b9d9fd06de8716c1b678ef30cfc4df9d6f44d
parente921ede54068b94702efcc1654dd0027c844012c (diff)
downloadbcm5719-llvm-05a9e344ee35f3b5989df5b95c80a2955389cbbb.tar.gz
bcm5719-llvm-05a9e344ee35f3b5989df5b95c80a2955389cbbb.zip
[YAMLTraits] - Revert a change committed by a mistake in D68983
I've accidentally reverted one of my previous patches. It was not catched by bots because (I guess) they do not build in debug (we have a test case which triggers an assert in MSVS when runs without this change). More info: https://reviews.llvm.org/D68983#inline-624235 Reported by Jordan Rupprecht.
-rw-r--r--llvm/include/llvm/Support/YAMLTraits.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h
index 656020ec49d..a3bfa7dc467 100644
--- a/llvm/include/llvm/Support/YAMLTraits.h
+++ b/llvm/include/llvm/Support/YAMLTraits.h
@@ -649,7 +649,8 @@ inline bool isBool(StringRef S) {
inline QuotingType needsQuotes(StringRef S) {
if (S.empty())
return QuotingType::Single;
- if (isspace(S.front()) || isspace(S.back()))
+ if (isspace(static_cast<unsigned char>(S.front())) ||
+ isspace(static_cast<unsigned char>(S.back())))
return QuotingType::Single;
if (isNull(S))
return QuotingType::Single;
OpenPOWER on IntegriCloud