summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Scope.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-10-22 18:07:04 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-10-22 18:07:04 +0000
commitb3b8ea800782583b47d0e11789a2a7a34b35213b (patch)
tree2f13720897ddaa079b8a011d70f780094f3c3052 /clang/lib/Sema/Scope.cpp
parent23c5a3fbecee2d64689fdc4e560d5bd797554c60 (diff)
downloadbcm5719-llvm-b3b8ea800782583b47d0e11789a2a7a34b35213b.tar.gz
bcm5719-llvm-b3b8ea800782583b47d0e11789a2a7a34b35213b.zip
Revert r193073 and the attempt to fix it in r193170.
This patch wasn't reviewed, and isn't correctly preserving the behaviors relied upon by QT. I don't have a direct example of fallout, but it should go through the standard code review process. For example, it should never have removed the QT test case that was added when fixing those users. llvm-svn: 193174
Diffstat (limited to 'clang/lib/Sema/Scope.cpp')
-rw-r--r--clang/lib/Sema/Scope.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/clang/lib/Sema/Scope.cpp b/clang/lib/Sema/Scope.cpp
index 8c2a8b37735..10f12ce844f 100644
--- a/clang/lib/Sema/Scope.cpp
+++ b/clang/lib/Sema/Scope.cpp
@@ -69,40 +69,3 @@ bool Scope::containedInPrototypeScope() const {
}
return false;
}
-
-void Scope::SetFlags(unsigned FlagsToSet) {
- assert((FlagsToSet & ~(BreakScope | ContinueScope)) == 0 ||
- "Unsupported scope flags");
- assert ((Flags & ControlScope) != 0 || "Must be control scope");
- if (FlagsToSet & BreakScope) {
- assert((Flags & BreakScope) == 0 || "Already set");
- BreakParent = this;
- }
- if (FlagsToSet & ContinueScope) {
- assert((Flags & ContinueScope) == 0 || "Already set");
- ContinueParent = this;
- }
- Flags |= FlagsToSet;
-}
-
-void Scope::ClearFlags(unsigned FlagsToClear) {
- assert((FlagsToClear & ~(BreakScope | ContinueScope)) == 0 ||
- "Unsupported scope flags");
- if (FlagsToClear & BreakScope) {
- assert((Flags & ControlScope) != 0 || "Must be control scope");
- assert((Flags & BreakScope) != 0 || "Already cleared");
- // This is a loop or switch scope. Flag BreakScope is removed temporarily
- // when parsing the loop or switch header, to prevent constructs like this:
- // \code
- // while (({ if(a>N) break; a}))
- // \endcode
- BreakParent = 0;
- }
- if (FlagsToClear & ContinueScope) {
- assert ((Flags & ControlScope) != 0 || "Must be control scope");
- assert((Flags & ContinueScope) != 0 || "Already cleared");
- ContinueParent = 0;
- }
- Flags &= ~FlagsToClear;
-}
-
OpenPOWER on IntegriCloud