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/Sema.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/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2e7f72f81c..049267ae36 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -61,8 +61,7 @@ bool FunctionScopeInfo::checkLabelUse(Stmt *Body, Sema &S) { // or address of a label taken, but no definition of it. Label fwd // definitions are indicated with a null substmt. if (L->getStmt() != 0) { - if (!L->isUsed()) - S.Diag(L->getLocation(), diag::warn_unused_label) << L->getDeclName(); + S.DiagnoseUnusedDecl(L); continue; } |