aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/ASTMatchers/Dynamic/VariantValue.h2
-rw-r--r--clang/include/clang/Basic/DirectoryEntry.h2
-rw-r--r--clang/include/clang/Basic/FileEntry.h2
-rw-r--r--clang/include/clang/Lex/Preprocessor.h2
-rw-r--r--clang/include/clang/Sema/Sema.h2
-rw-r--r--clang/lib/ASTMatchers/Dynamic/Marshallers.h10
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp2
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp6
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp2
12 files changed, 18 insertions, 18 deletions
diff --git a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
index e1c19eb..240ee9a 100644
--- a/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
+++ b/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
@@ -188,7 +188,7 @@ public:
bool hasTypedMatcher(ASTNodeKind NK) const {
if (!Value) return false;
- return Value->getTypedMatcher(MatcherOps(NK)).hasValue();
+ return Value->getTypedMatcher(MatcherOps(NK)).has_value();
}
/// Determines if the contained matcher can be converted to \p Kind.
diff --git a/clang/include/clang/Basic/DirectoryEntry.h b/clang/include/clang/Basic/DirectoryEntry.h
index 2e67e14..fe5ec95 100644
--- a/clang/include/clang/Basic/DirectoryEntry.h
+++ b/clang/include/clang/Basic/DirectoryEntry.h
@@ -299,7 +299,7 @@ public:
/// DirectoryEntry::getName have been deleted, delete this class and replace
/// instances with Optional<DirectoryEntryRef>
operator const DirectoryEntry *() const {
- return hasValue() ? &getValue().getDirEntry() : nullptr;
+ return has_value() ? &value().getDirEntry() : nullptr;
}
};
diff --git a/clang/include/clang/Basic/FileEntry.h b/clang/include/clang/Basic/FileEntry.h
index 92a6715..8676604 100644
--- a/clang/include/clang/Basic/FileEntry.h
+++ b/clang/include/clang/Basic/FileEntry.h
@@ -313,7 +313,7 @@ public:
/// FileEntry::getName have been deleted, delete this class and replace
/// instances with Optional<FileEntryRef>
operator const FileEntry *() const {
- return hasValue() ? &getValue().getFileEntry() : nullptr;
+ return has_value() ? &value().getFileEntry() : nullptr;
}
};
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index 9bd4b40..d130aba 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -517,7 +517,7 @@ private:
bool hasRecordedPreamble() const { return !ConditionalStack.empty(); }
- bool reachedEOFWhileSkipping() const { return SkipInfo.hasValue(); }
+ bool reachedEOFWhileSkipping() const { return SkipInfo.has_value(); }
void clearSkipInfo() { SkipInfo.reset(); }
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 90af100..12e472a 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -1742,7 +1742,7 @@ public:
SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default;
~SemaDiagnosticBuilder();
- bool isImmediate() const { return ImmediateDiag.hasValue(); }
+ bool isImmediate() const { return ImmediateDiag.has_value(); }
/// Convertible to bool: True if we immediately emitted an error, false if
/// we didn't emit an error or we created a deferred error.
diff --git a/clang/lib/ASTMatchers/Dynamic/Marshallers.h b/clang/lib/ASTMatchers/Dynamic/Marshallers.h
index 3e9c4f3..bab36e5 100644
--- a/clang/lib/ASTMatchers/Dynamic/Marshallers.h
+++ b/clang/lib/ASTMatchers/Dynamic/Marshallers.h
@@ -174,7 +174,7 @@ public:
return Value.isString();
}
static bool hasCorrectValue(const VariantValue& Value) {
- return getAttrKind(Value.getString()).hasValue();
+ return getAttrKind(Value.getString()).has_value();
}
static attr::Kind get(const VariantValue &Value) {
@@ -204,7 +204,7 @@ public:
return Value.isString();
}
static bool hasCorrectValue(const VariantValue& Value) {
- return getCastKind(Value.getString()).hasValue();
+ return getCastKind(Value.getString()).has_value();
}
static CastKind get(const VariantValue &Value) {
@@ -227,7 +227,7 @@ public:
return Value.isString();
}
static bool hasCorrectValue(const VariantValue& Value) {
- return getFlags(Value.getString()).hasValue();
+ return getFlags(Value.getString()).has_value();
}
static llvm::Regex::RegexFlags get(const VariantValue &Value) {
@@ -254,7 +254,7 @@ public:
return Value.isString();
}
static bool hasCorrectValue(const VariantValue& Value) {
- return getClauseKind(Value.getString()).hasValue();
+ return getClauseKind(Value.getString()).has_value();
}
static OpenMPClauseKind get(const VariantValue &Value) {
@@ -285,7 +285,7 @@ public:
return Value.isString();
}
static bool hasCorrectValue(const VariantValue& Value) {
- return getUnaryOrTypeTraitKind(Value.getString()).hasValue();
+ return getUnaryOrTypeTraitKind(Value.getString()).has_value();
}
static UnaryExprOrTypeTrait get(const VariantValue &Value) {
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 6b5b715..98d8e8b 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -168,7 +168,7 @@ static llvm::Optional<QualType> getUnwidenedIntegerType(const ASTContext &Ctx,
/// Check if \p E is a widened promoted integer.
static bool IsWidenedIntegerOp(const ASTContext &Ctx, const Expr *E) {
- return getUnwidenedIntegerType(Ctx, E).hasValue();
+ return getUnwidenedIntegerType(Ctx, E).has_value();
}
/// Check if we can skip the overflow check for \p Op.
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 61137f5..0fe084b 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -130,7 +130,7 @@ public:
void setCounter(Counter C) { Count = C; }
- bool hasStartLoc() const { return LocStart.hasValue(); }
+ bool hasStartLoc() const { return LocStart.has_value(); }
void setStartLoc(SourceLocation Loc) { LocStart = Loc; }
@@ -139,7 +139,7 @@ public:
return *LocStart;
}
- bool hasEndLoc() const { return LocEnd.hasValue(); }
+ bool hasEndLoc() const { return LocEnd.has_value(); }
void setEndLoc(SourceLocation Loc) {
assert(Loc.isValid() && "Setting an invalid end location");
@@ -155,7 +155,7 @@ public:
void setGap(bool Gap) { GapRegion = Gap; }
- bool isBranch() const { return FalseCount.hasValue(); }
+ bool isBranch() const { return FalseCount.has_value(); }
};
/// Spelling locations for the start and end of a source region.
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 31d6aa0..49e1473 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -1243,7 +1243,7 @@ static bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II,
}
// Get the result value. A result of true means the file exists.
- return File.hasValue();
+ return File.has_value();
}
bool Preprocessor::EvaluateHasInclude(Token &Tok, IdentifierInfo *II) {
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index 3087cd1..9ec33e89 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -828,7 +828,7 @@ public:
/// Determine whether this pack expansion scope has a known, fixed arity.
/// This happens if it involves a pack from an outer template that has
/// (notionally) already been expanded.
- bool hasFixedArity() { return FixedNumExpansions.hasValue(); }
+ bool hasFixedArity() { return FixedNumExpansions.has_value(); }
/// Determine whether the next element of the argument is still part of this
/// pack. This is the case unless the pack is already expanded to a fixed
diff --git a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
index 50eec38..472eb22 100644
--- a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
@@ -152,7 +152,7 @@ Optional<SVal> getTaintedPointeeOrPointer(const CheckerContext &C, SVal Arg) {
bool isTaintedOrPointsToTainted(const Expr *E, const ProgramStateRef &State,
CheckerContext &C) {
- return getTaintedPointeeOrPointer(C, C.getSVal(E)).hasValue();
+ return getTaintedPointeeOrPointer(C, C.getSVal(E)).has_value();
}
/// ArgSet is used to describe arguments relevant for taint detection or
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 8d928d1..4a4694a 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -258,7 +258,7 @@ static bool isVarAnInterestingCondition(const Expr *CondVarExpr,
static bool isInterestingExpr(const Expr *E, const ExplodedNode *N,
const PathSensitiveBugReport *B) {
if (Optional<SVal> V = getSValForVar(E, N))
- return B->getInterestingnessKind(*V).hasValue();
+ return B->getInterestingnessKind(*V).has_value();
return false;
}