diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-06 21:18:44 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-06 21:18:44 +0000 |
| commit | 55106310aeaffdf80e078aa306452cc00614370e (patch) | |
| tree | ee4f20aff4dd884d0ea5358b7a56e7fba7a70422 /clang/lib/Sema/SemaExpr.cpp | |
| parent | b270f28c1ab39f16ca289f3724e2ba9b300ad944 (diff) | |
| download | bcm5719-llvm-55106310aeaffdf80e078aa306452cc00614370e.tar.gz bcm5719-llvm-55106310aeaffdf80e078aa306452cc00614370e.zip | |
Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.
llvm-svn: 115842
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index ef21a2719b6..d54a8582210 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -57,8 +57,10 @@ using namespace sema; /// bool Sema::DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc) { // See if the decl is deprecated. - if (D->getAttr<DeprecatedAttr>()) { - EmitDeprecationWarning(D, Loc); + if (const DeprecatedAttr *DA = D->getAttr<DeprecatedAttr>()) { + const char *Message = + DA->getMessage().empty() ? "" : DA->getMessage().data(); + EmitDeprecationWarning(D, Message, Loc); } // See if the decl is unavailable |

