From 1ddd6d2b6b804e8036e60cfa500b31cce1373bc9 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 21 Jul 2010 20:43:11 +0000 Subject: Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now Clang's behavior is more strict in this case, but more consistent. We will need to see how much this fires on real code and determine whether this case should be downgraded to a warning. Fixes . llvm-svn: 109033 --- clang/lib/Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 73127df5ddc..58bc4f0801d 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -59,7 +59,7 @@ bool Sema::DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc) { // See if the decl is unavailable if (D->getAttr()) { - Diag(Loc, diag::warn_unavailable) << D->getDeclName(); + Diag(Loc, diag::err_unavailable) << D->getDeclName(); Diag(D->getLocation(), diag::note_unavailable_here) << 0; } -- cgit v1.2.3