aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/YAMLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/YAMLParser.cpp')
-rw-r--r--llvm/lib/Support/YAMLParser.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp
index e9619f5..5046074 100644
--- a/llvm/lib/Support/YAMLParser.cpp
+++ b/llvm/lib/Support/YAMLParser.cpp
@@ -259,8 +259,9 @@ public:
Token getNext();
void printError(SMLoc Loc, SourceMgr::DiagKind Kind, const Twine &Message,
- ArrayRef<SMRange> Ranges = None) {
- SM.PrintMessage(Loc, Kind, Message, Ranges, /* FixIts= */ None, ShowColors);
+ ArrayRef<SMRange> Ranges = std::nullopt) {
+ SM.PrintMessage(Loc, Kind, Message, Ranges, /* FixIts= */ std::nullopt,
+ ShowColors);
}
void setError(const Twine &Message, StringRef::iterator Position) {
@@ -771,7 +772,7 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'N':
return false;
default:
- return None;
+ return std::nullopt;
}
case 2:
switch (S.front()) {
@@ -782,7 +783,7 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'o':
if (S[1] == 'n') //[Oo]n
return true;
- return None;
+ return std::nullopt;
case 'N':
if (S[1] == 'O') // NO
return false;
@@ -790,9 +791,9 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'n':
if (S[1] == 'o') //[Nn]o
return false;
- return None;
+ return std::nullopt;
default:
- return None;
+ return std::nullopt;
}
case 3:
switch (S.front()) {
@@ -803,7 +804,7 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'o':
if (S.drop_front() == "ff") //[Oo]ff
return false;
- return None;
+ return std::nullopt;
case 'Y':
if (S.drop_front() == "ES") // YES
return true;
@@ -811,9 +812,9 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'y':
if (S.drop_front() == "es") //[Yy]es
return true;
- return None;
+ return std::nullopt;
default:
- return None;
+ return std::nullopt;
}
case 4:
switch (S.front()) {
@@ -824,9 +825,9 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 't':
if (S.drop_front() == "rue") //[Tt]rue
return true;
- return None;
+ return std::nullopt;
default:
- return None;
+ return std::nullopt;
}
case 5:
switch (S.front()) {
@@ -837,12 +838,12 @@ llvm::Optional<bool> yaml::parseBool(StringRef S) {
case 'f':
if (S.drop_front() == "alse") //[Ff]alse
return false;
- return None;
+ return std::nullopt;
default:
- return None;
+ return std::nullopt;
}
default:
- return None;
+ return std::nullopt;
}
}