diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-18 21:56:37 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-18 21:56:37 +0000 |
commit | 48f3bb9f780f6e64ab71ba0202ca04b07473805a (patch) | |
tree | df7ad34f04fbb5b8a22e75e34e31471a6ee6d511 /lib/Sema/SemaDeclObjC.cpp | |
parent | 4fd83ea566f4a0c083001c84b75da6cc8c99c1d6 (diff) |
Downgrade complaints about calling unavailable functions to a warning
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.
Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.
Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index dee352b79b..b890637767 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -111,7 +111,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, // Diagnose classes that inherit from deprecated classes. if (SuperClassDecl) - DiagnoseUseOfDeprecatedDecl(SuperClassDecl, SuperLoc); + (void)DiagnoseUseOfDecl(SuperClassDecl, SuperLoc); if (PrevDecl && SuperClassDecl == 0) { // The previous declaration was not a class decl. Check if we have a @@ -270,7 +270,7 @@ Sema::FindProtocolDeclaration(bool WarnOnDeclarations, continue; } - DiagnoseUseOfDeprecatedDecl(PDecl, ProtocolId[i].second); + (void)DiagnoseUseOfDecl(PDecl, ProtocolId[i].second); // If this is a forward declaration and we are supposed to warn in this // case, do it. @@ -493,7 +493,7 @@ ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, CDecl->setClassInterface(IDecl); // If the interface is deprecated, warn about it. - DiagnoseUseOfDeprecatedDecl(IDecl, ClassLoc); + (void)DiagnoseUseOfDecl(IDecl, ClassLoc); /// Check for duplicate interface declaration for this category ObjCCategoryDecl *CDeclChain; |