diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-17 20:34:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-17 20:34:02 +0000 |
commit | 57ad37823e198f977cac605dbfbaefb4daf325e9 (patch) | |
tree | 6a224b2610fe145e615126e76e465f9cbdf77401 /lib/Sema/SemaDeclAttr.cpp | |
parent | d8e54990ade0dd5566f8e3aa2e62def08753d1e9 (diff) |
Step #2/N of __label__ support: keep pushing LabelDecl forward,
making them be template instantiated in a more normal way and
make them handle attributes like other decls.
This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index b0636bcb96..54e9405cba 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -921,9 +921,9 @@ static void HandleUnusedAttr(Decl *d, const AttributeList &Attr, Sema &S) { } if (!isa<VarDecl>(d) && !isa<ObjCIvarDecl>(d) && !isFunctionOrMethod(d) && - !isa<TypeDecl>(d)) { + !isa<TypeDecl>(d) && !isa<LabelDecl>(d)) { S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) - << Attr.getName() << 2 /*variable and function*/; + << Attr.getName() << 14 /*variable, function, labels*/; return; } |