diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-19 21:21:25 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-19 21:21:25 +0000 |
commit | 355a9fe26a6dec89680ddf713dd5bc7a671b298a (patch) | |
tree | a34cfa46d5e8f82d4de034dfb0af58150fc5f5b8 /lib/Sema/SemaStmt.cpp | |
parent | d2827af6f96d441d72315dbe6d8505c3be0f2aa6 (diff) |
Implement -Wunused-label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 47ea4f2c25..24489544e0 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -994,6 +994,7 @@ Sema::ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, if (LabelDecl == 0) LabelDecl = new (Context) LabelStmt(LabelLoc, LabelII, 0); + LabelDecl->setUsed(); return Owned(new (Context) GotoStmt(LabelDecl, GotoLoc, LabelLoc)); } |