summaryrefslogtreecommitdiff
path: root/include/clang/ASTMatchers/Dynamic/VariantValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/ASTMatchers/Dynamic/VariantValue.h')
-rw-r--r--include/clang/ASTMatchers/Dynamic/VariantValue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/ASTMatchers/Dynamic/VariantValue.h b/include/clang/ASTMatchers/Dynamic/VariantValue.h
index 9f694d0ce434..2c80b5137320 100644
--- a/include/clang/ASTMatchers/Dynamic/VariantValue.h
+++ b/include/clang/ASTMatchers/Dynamic/VariantValue.h
@@ -119,7 +119,7 @@ class VariantMatcher {
/// \brief Payload interface to be specialized by each matcher type.
///
/// It follows a similar interface as VariantMatcher itself.
- class Payload : public RefCountedBase<Payload> {
+ class Payload {
public:
virtual ~Payload();
virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const = 0;
@@ -208,7 +208,8 @@ public:
std::string getTypeAsString() const;
private:
- explicit VariantMatcher(Payload *Value) : Value(Value) {}
+ explicit VariantMatcher(std::shared_ptr<Payload> Value)
+ : Value(std::move(Value)) {}
template <typename T> struct TypedMatcherOps;
@@ -216,7 +217,7 @@ private:
class PolymorphicPayload;
class VariadicOpPayload;
- IntrusiveRefCntPtr<const Payload> Value;
+ std::shared_ptr<const Payload> Value;
};
template <typename T>