summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-04-29 17:03:34 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-04-29 17:03:34 +0000
commite801f6a7f4448be91f7598818af92b3f0ec9f36a (patch)
tree9d9e3c5453676fa20db93aa38accf645860cb090 /clang/lib/Sema/SemaDeclAttr.cpp
parentfa3e04298b65abf1ef34187ab45db8b16329d4bf (diff)
downloadbcm5719-llvm-e801f6a7f4448be91f7598818af92b3f0ec9f36a.tar.gz
bcm5719-llvm-e801f6a7f4448be91f7598818af92b3f0ec9f36a.zip
Add a Subjects line to NoDebugAttr [NFC].
The 'nodebug' attribute had hand-coded constraints; replace those with a Subjects line in Attr.td. Also add a missing test to verify the attribute is okay on an Objective-C method. Differential Revision: http://reviews.llvm.org/D19689 llvm-svn: 268065
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 9bf5fc9e36d..cbc95dc643d 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3572,18 +3572,6 @@ void Sema::AddModeAttr(SourceRange AttrRange, Decl *D, IdentifierInfo *Name,
}
static void handleNoDebugAttr(Sema &S, Decl *D, const AttributeList &Attr) {
- if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
- if (!VD->hasGlobalStorage())
- S.Diag(Attr.getLoc(),
- diag::warn_attribute_requires_functions_or_static_globals)
- << Attr.getName();
- } else if (!isFunctionOrMethod(D)) {
- S.Diag(Attr.getLoc(),
- diag::warn_attribute_requires_functions_or_static_globals)
- << Attr.getName();
- return;
- }
-
D->addAttr(::new (S.Context)
NoDebugAttr(Attr.getRange(), S.Context,
Attr.getAttributeSpellingListIndex()));
OpenPOWER on IntegriCloud