with member initializer list defined inside
an objc implementation block. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161692
91177308-0d34-0410-b5e6-
96231b3b80d8
Toks.push_back(Tok);
if (Tok.is(tok::kw_try)) {
ConsumeToken();
+ if (Tok.is(tok::colon)) {
+ Toks.push_back(Tok);
+ ConsumeToken();
+ while (Tok.isNot(tok::l_brace)) {
+ ConsumeAndStoreUntil(tok::l_paren, Toks, /*StopAtSemi=*/false);
+ ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false);
+ }
+ }
+ assert(Tok.is(tok::l_brace)
+ && "StashAwayMethodOrFunctionBodyTokens - '{' not found");
Toks.push_back(Tok); // also store '{'
}
ConsumeBrace();
struct BadReturn {
BadReturn(MyClass * myObject);
int bar(MyClass * myObject);
+ void MemFunc(MyClass * myObject);
int i;
+ MyClass *CObj;
};
@implementation MyClass
return 0;
}
-BadReturn::BadReturn(MyClass * myObject) try {
+BadReturn::BadReturn(MyClass * myObject) try : CObj(myObject) {
} catch(...) {
try {
[myObject privateMethod];
[myObject privateMethod1];
getMe = bar(myObject);
+ [CObj privateMethod1];
+ } catch(int ei) {
+ i = ei;
+ } catch(...) {
+ {
+ i = 0;
+ }
+ }
+}
+
+void BadReturn::MemFunc(MyClass * myObject) try {
+} catch(...) {
+ try {
+ [myObject privateMethod];
+ [myObject privateMethod1];
+ getMe = bar(myObject);
+ [CObj privateMethod1];
} catch(int ei) {
i = ei;
} catch(...) {