diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
commit | c202b2809ac814bcae8553cd772ec4901fdb8441 (patch) | |
tree | 62ba003fd9543a7e7e961b6b08b09ed314c5a040 /clang/lib/AST/Stmt.cpp | |
parent | 0fcd749a5186b1d3b1c75cfe028df3cfaba6989f (diff) | |
download | bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.tar.gz bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.zip |
Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 6af20df4beb..e4d9f0a1ef4 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/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<SwitchCase>(S)) S = SC->getSubStmt(); + else if (const AttributedStmt *AS = dyn_cast<AttributedStmt>(S)) + S = AS->getSubStmt(); else return S; } |