diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-12 22:25:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-12 22:25:41 +0000 |
commit | 3a9fefed0749f7a293379156c22a24509c24cc3e (patch) | |
tree | 8b30395c200b96dae1ac704378ef1d3b88799e14 /test/CXX/basic | |
parent | 41296e8a633fc3a9768ebe357a7284fdef278fd2 (diff) | |
download | clang-3a9fefed0749f7a293379156c22a24509c24cc3e.tar.gz |
Fix more try scoping bugs introduced by r167650.
Introduces more clear scoping flags & flag combinations which should hopefully
be more understandable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/basic')
-rw-r--r-- | test/CXX/basic/basic.scope/basic.scope.local/p2.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp index 91e96b6b26..7c7b84d678 100644 --- a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp +++ b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp @@ -35,3 +35,26 @@ void func7() { int i; // expected-error{{redefinition of 'i'}} } } + +void func8() { + int i; + try { + int i; + } catch (...) { + } +} + +void func9() { + if (bool b = true) + try { + int b; // FIXME: this probably should be invalid, maybe + } catch (...) { + } +} + +void func10() { + if (bool b = true) + if (true) { + int b; // FIXME: decide whether this is valid + } +} |