aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp3
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;
}