specifier that we corrected to.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878
91177308-0d34-0410-b5e6-
96231b3b80d8
"%2?">;
def err_undeclared_protocol_suggest : Error<
"cannot find protocol declaration for %0; did you mean %1?">;
-
+def note_base_class_specified_here : Note<
+ "base class %0 specified here">;
}
<< MemberOrBase << false << R.getLookupName()
<< CodeModificationHint::CreateReplacement(R.getNameLoc(),
R.getLookupName().getAsString());
-
+
+ const CXXBaseSpecifier *BaseSpec = DirectBaseSpec? DirectBaseSpec
+ : VirtualBaseSpec;
+ Diag(BaseSpec->getSourceRange().getBegin(),
+ diag::note_base_class_specified_here)
+ << BaseSpec->getType()
+ << BaseSpec->getSourceRange();
+
TyD = Type;
}
}
}
struct Base { };
-struct Derived : public Base {
+struct Derived : public Base { // expected-note{{base class 'struct Base' specified here}}
int member; // expected-note 3{{'member' declared here}}
Derived() : base(), // expected-error{{initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'?}}