diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-07-21 20:43:11 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-07-21 20:43:11 +0000 |
| commit | 1ddd6d2b6b804e8036e60cfa500b31cce1373bc9 (patch) | |
| tree | 4454fe5189b68b411d049af48cf379df4e40fdfc /clang/lib/Sema/SemaExpr.cpp | |
| parent | 19b3830142001b74e29ab5fa11ef76e87aaf7b1e (diff) | |
| download | bcm5719-llvm-1ddd6d2b6b804e8036e60cfa500b31cce1373bc9.tar.gz bcm5719-llvm-1ddd6d2b6b804e8036e60cfa500b31cce1373bc9.zip | |
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 <rdar://problem/8213093>.
llvm-svn: 109033
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<UnavailableAttr>()) { - Diag(Loc, diag::warn_unavailable) << D->getDeclName(); + Diag(Loc, diag::err_unavailable) << D->getDeclName(); Diag(D->getLocation(), diag::note_unavailable_here) << 0; } |

