aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h')
-rw-r--r--contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
index a81d67ab3063..65982457ad83 100644
--- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
+++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
@@ -16,7 +16,7 @@
#include "clang/AST/OperationKinds.h"
#include "clang/AST/Stmt.h"
#include "clang/Basic/OperatorKinds.h"
-#include "llvm/ADT/Optional.h"
+#include <optional>
#include <tuple>
namespace clang {
@@ -24,7 +24,6 @@ namespace clang {
class Expr;
class VarDecl;
class QualType;
-class AttributedType;
class Preprocessor;
namespace ento {
@@ -68,8 +67,9 @@ Nullability getNullabilityAnnotation(QualType Type);
/// Try to parse the value of a defined preprocessor macro. We can only parse
/// simple expressions that consist of an optional minus sign token and then a
-/// token for an integer. If we cannot parse the value then None is returned.
-llvm::Optional<int> tryExpandAsInteger(StringRef Macro, const Preprocessor &PP);
+/// token for an integer. If we cannot parse the value then std::nullopt is
+/// returned.
+std::optional<int> tryExpandAsInteger(StringRef Macro, const Preprocessor &PP);
class OperatorKind {
union {
@@ -88,7 +88,7 @@ public:
return Op.Bin;
}
- Optional<BinaryOperatorKind> GetBinaryOp() const {
+ std::optional<BinaryOperatorKind> GetBinaryOp() const {
if (IsBinary)
return Op.Bin;
return {};
@@ -100,7 +100,7 @@ public:
return Op.Un;
}
- Optional<UnaryOperatorKind> GetUnaryOp() const {
+ std::optional<UnaryOperatorKind> GetUnaryOp() const {
if (!IsBinary)
return Op.Un;
return {};