diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-07 17:20:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-07 17:20:56 +0000 |
commit | c2ee10d79f70036af652a395ac1f8273f3d04e12 (patch) | |
tree | d6db3c7d97d104967ff017f0687d14bb0e658bb5 /include/clang/AST/Stmt.h | |
parent | 82fc0cb7883747942326d6d6ca1333b27bd647f0 (diff) |
Move the internal DeclContext data structures into a separate header.
Simplify the addition of a case statement to a switch.
Fix -print-stats for attribute-qualified types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Stmt.h')
-rw-r--r-- | include/clang/AST/Stmt.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 11023234b0..c99f0a9b2f 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -587,9 +587,8 @@ public: SwitchLoc = SL; } void addSwitchCase(SwitchCase *SC) { - if (FirstCase) - SC->setNextSwitchCase(FirstCase); - + assert(!SC->getNextSwitchCase() && "case/default already added to a switch"); + SC->setNextSwitchCase(FirstCase); FirstCase = SC; } virtual SourceRange getSourceRange() const { |