From 73c18e0362922ac6785ca8d2526fa9784a0f0c93 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 6 Sep 2007 17:11:52 +0000 Subject: Added LabelLoc to GotoStmt to record the source location of the label token in the actual GotoStmt. Fixed bug where GotoStmt::getSourceRange incorrectly used the target LabelStmt to compute its extent. llvm-svn: 41745 --- clang/Sema/SemaStmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/Sema/SemaStmt.cpp') diff --git a/clang/Sema/SemaStmt.cpp b/clang/Sema/SemaStmt.cpp index 2924370df3a..9cca2c24f02 100644 --- a/clang/Sema/SemaStmt.cpp +++ b/clang/Sema/SemaStmt.cpp @@ -510,7 +510,7 @@ Sema::ParseGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, if (LabelDecl == 0) LabelDecl = new LabelStmt(LabelLoc, LabelII, 0); - return new GotoStmt(LabelDecl, GotoLoc); + return new GotoStmt(LabelDecl, GotoLoc, LabelLoc); } Action::StmtResult -- cgit v1.2.3