diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-07 20:02:20 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-07 20:02:20 -0800 |
commit | 71f557355ddaea358c43b151de3a0e045aaa0863 (patch) | |
tree | 04f517c320519c799def0657b86b5a03499f3c4d /clang-tools-extra/clang-query | |
parent | 270e96f435596449002fc89962595497481c8770 (diff) | |
download | llvm-71f557355ddaea358c43b151de3a0e045aaa0863.tar.gz |
[clang-tools-extra] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'clang-tools-extra/clang-query')
-rw-r--r-- | clang-tools-extra/clang-query/Query.cpp | 1 | ||||
-rw-r--r-- | clang-tools-extra/clang-query/QueryParser.cpp | 1 | ||||
-rw-r--r-- | clang-tools-extra/clang-query/tool/ClangQuery.cpp | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-query/Query.cpp b/clang-tools-extra/clang-query/Query.cpp index 4d62f37231b7..d1db851c1297 100644 --- a/clang-tools-extra/clang-query/Query.cpp +++ b/clang-tools-extra/clang-query/Query.cpp @@ -14,6 +14,7 @@ #include "clang/Frontend/TextDiagnostic.h" #include "clang/Tooling/NodeIntrospection.h" #include "llvm/Support/raw_ostream.h" +#include <optional> using namespace clang::ast_matchers; using namespace clang::ast_matchers::dynamic; diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp index b80ad04726bc..77621d252aed 100644 --- a/clang-tools-extra/clang-query/QueryParser.cpp +++ b/clang-tools-extra/clang-query/QueryParser.cpp @@ -14,6 +14,7 @@ #include "clang/Tooling/NodeIntrospection.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" +#include <optional> #include <set> using namespace llvm; diff --git a/clang-tools-extra/clang-query/tool/ClangQuery.cpp b/clang-tools-extra/clang-query/tool/ClangQuery.cpp index 2bdb36192f35..6ba2b1a4412d 100644 --- a/clang-tools-extra/clang-query/tool/ClangQuery.cpp +++ b/clang-tools-extra/clang-query/tool/ClangQuery.cpp @@ -37,6 +37,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Signals.h" #include "llvm/Support/WithColor.h" +#include <optional> #include <string> using namespace clang; |