ParsingDeclStackState PushParsingDeclaration();
void PopParsingDeclaration(ParsingDeclStackState S, Decl *D);
void EmitDeprecationWarning(NamedDecl *D, llvm::StringRef Message,
- SourceLocation Loc, bool UnkownObjCClass=false);
+ SourceLocation Loc, bool UnknownObjCClass=false);
void HandleDelayedDeprecationCheck(sema::DelayedDiagnostic &DD, Decl *Ctx);
// Expression Parsing Callbacks: SemaExpr.cpp.
bool DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc,
- bool UnkownObjCClass=false);
+ bool UnknownObjCClass=false);
bool DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *PD,
ObjCMethodDecl *Getter,
SourceLocation Loc);
void Sema::EmitDeprecationWarning(NamedDecl *D, llvm::StringRef Message,
SourceLocation Loc,
- bool UnkownObjCClass) {
+ bool UnknownObjCClass) {
// Delay if we're currently parsing a declaration.
if (ParsingDeclDepth) {
DelayedDiagnostics.push_back(DelayedDiagnostic::makeDeprecation(Loc, D,
Diag(Loc, diag::warn_deprecated_message) << D->getDeclName()
<< Message;
else {
- if (!UnkownObjCClass)
+ if (!UnknownObjCClass)
Diag(Loc, diag::warn_deprecated) << D->getDeclName();
else
Diag(Loc, diag::warn_deprecated_fwdclass_message) << D->getDeclName();
/// referenced), false otherwise.
///
bool Sema::DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc,
- bool UnkownObjCClass) {
+ bool UnknownObjCClass) {
if (getLangOptions().CPlusPlus && isa<FunctionDecl>(D)) {
// If there were any diagnostics suppressed by template argument deduction,
// emit them now.
// See if the decl is deprecated.
if (const DeprecatedAttr *DA = D->getAttr<DeprecatedAttr>())
- EmitDeprecationWarning(D, DA->getMessage(), Loc, UnkownObjCClass);
+ EmitDeprecationWarning(D, DA->getMessage(), Loc, UnknownObjCClass);
// See if the decl is unavailable
if (const UnavailableAttr *UA = D->getAttr<UnavailableAttr>()) {
if (UA->getMessage().empty()) {
- if (!UnkownObjCClass)
+ if (!UnknownObjCClass)
Diag(Loc, diag::err_unavailable) << D->getDeclName();
else
Diag(Loc, diag::warn_unavailable_fwdclass_message)