summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_tree.h')
-rw-r--r--src/mongo/db/matcher/expression_tree.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_tree.h b/src/mongo/db/matcher/expression_tree.h
index d6d1fec2159..4da0af5d8fc 100644
--- a/src/mongo/db/matcher/expression_tree.h
+++ b/src/mongo/db/matcher/expression_tree.h
@@ -215,11 +215,13 @@ public:
class NotMatchExpression final : public MatchExpression {
public:
- explicit NotMatchExpression(MatchExpression* e) : MatchExpression(NOT), _exp(e) {}
+ explicit NotMatchExpression(MatchExpression* e,
+ clonable_ptr<ErrorAnnotation> annotation = nullptr)
+ : MatchExpression(NOT, std::move(annotation)), _exp(e) {}
virtual std::unique_ptr<MatchExpression> shallowClone() const {
std::unique_ptr<NotMatchExpression> self =
- std::make_unique<NotMatchExpression>(_exp->shallowClone().release());
+ std::make_unique<NotMatchExpression>(_exp->shallowClone().release(), _errorAnnotation);
if (getTag()) {
self->setTag(getTag()->clone());
}