diff --git a/clang/unittests/AST/APValueTest.cpp b/clang/unittests/AST/APValueTest.cpp index 98cb086931e6..5ac454de5f13 100644 --- a/clang/unittests/AST/APValueTest.cpp +++ b/clang/unittests/AST/APValueTest.cpp @@ -31,6 +31,10 @@ class DiagnosticOutputGetter { } StringRef get() const { return LastDiagnostic; } + + virtual DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const { + return new LastDiagnosticString(); + } }; const IntrusiveRefCntPtr DiagIDs;