}
ExprResult RebuildRecoveryExpr(SourceLocation BeginLoc, SourceLocation EndLoc,
- ArrayRef<Expr *> SubExprs) {
- return getSema().CreateRecoveryExpr(BeginLoc, EndLoc, SubExprs);
+ ArrayRef<Expr *> SubExprs, QualType Type) {
+ return getSema().CreateRecoveryExpr(BeginLoc, EndLoc, SubExprs, Type);
}
private:
if (!getDerived().AlwaysRebuild() && !Changed)
return E;
return getDerived().RebuildRecoveryExpr(E->getBeginLoc(), E->getEndLoc(),
- Children);
+ Children, E->getType());
}
template<typename Derived>
--- /dev/null
+// RUN: %clang_cc1 -verify -frecovery-ast -frecovery-ast-type %s
+
+template <class T> struct Ptr { T *operator->() const; };
+
+struct ABC {
+ void run();
+};
+
+Ptr<ABC> call(int); // expected-note {{candidate function not viable}}
+
+void test() {
+ call()->run(undef); // expected-error {{no matching function for call to 'call'}} \
+ expected-error {{use of undeclared identifier}}
+}