aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h')
-rw-r--r--contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h b/contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h
index 57934bfc09d9..2a27aba76656 100644
--- a/contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h
+++ b/contrib/llvm-project/clang/include/clang/Analysis/MacroExpansionContext.h
@@ -13,9 +13,9 @@
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
+#include <optional>
namespace clang {
@@ -85,14 +85,16 @@ public:
/// \param MacroExpansionLoc Must be the expansion location of a macro.
/// \return The textual representation of the token sequence which was
/// substituted in place of the macro after the preprocessing.
- /// If no macro was expanded at that location, returns llvm::None.
- Optional<StringRef> getExpandedText(SourceLocation MacroExpansionLoc) const;
+ /// If no macro was expanded at that location, returns std::nullopt.
+ std::optional<StringRef>
+ getExpandedText(SourceLocation MacroExpansionLoc) const;
/// \param MacroExpansionLoc Must be the expansion location of a macro.
/// \return The text from the original source code which were substituted by
/// the macro expansion chain from the given location.
- /// If no macro was expanded at that location, returns llvm::None.
- Optional<StringRef> getOriginalText(SourceLocation MacroExpansionLoc) const;
+ /// If no macro was expanded at that location, returns std::nullopt.
+ std::optional<StringRef>
+ getOriginalText(SourceLocation MacroExpansionLoc) const;
LLVM_DUMP_METHOD void dumpExpansionRangesToStream(raw_ostream &OS) const;
LLVM_DUMP_METHOD void dumpExpandedTextsToStream(raw_ostream &OS) const;