From 6b9a6e390fbb92c40eb9c6ac9e7abbd88dd7a767 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 3 May 2012 16:53:59 +0000 Subject: Vendor import of clang release_31 branch r155985: http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985 --- lib/AST/Stmt.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/AST/Stmt.cpp') diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 6af20df4beba..e4d9f0a1ef42 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -97,8 +97,8 @@ Stmt *Stmt::IgnoreImplicit() { /// \brief Strip off all label-like statements. /// -/// This will strip off label statements, case statements, and default -/// statements recursively. +/// This will strip off label statements, case statements, attributed +/// statements and default statements recursively. const Stmt *Stmt::stripLabelLikeStatements() const { const Stmt *S = this; while (true) { @@ -106,6 +106,8 @@ const Stmt *Stmt::stripLabelLikeStatements() const { S = LS->getSubStmt(); else if (const SwitchCase *SC = dyn_cast(S)) S = SC->getSubStmt(); + else if (const AttributedStmt *AS = dyn_cast(S)) + S = AS->getSubStmt(); else return S; } -- cgit v1.3