]> granicus.if.org Git - clang/commit
Downgrade complaints about calling unavailable functions to a warning
authorDouglas Gregor <dgregor@apple.com>
Wed, 18 Feb 2009 21:56:37 +0000 (21:56 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 18 Feb 2009 21:56:37 +0000 (21:56 +0000)
commit48f3bb9f780f6e64ab71ba0202ca04b07473805a
treedf7ad34f04fbb5b8a22e75e34e31471a6ee6d511
parent4fd83ea566f4a0c083001c84b75da6cc8c99c1d6
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
14 files changed:
include/clang/AST/Decl.h
include/clang/Basic/DiagnosticSemaKinds.def
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
test/Sema/overloadable.c
test/SemaCXX/attr-unavailable.cpp
test/SemaObjC/protocol-atttribute-1.m