[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288893: [ObjC++] Don't enter a C++ declarator scope when the current context is (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26922?vs=79722=80556#toc Repository: rL

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-12-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. I think this is fine. I guess we can print a more helpful error message than "error: property requires fields to be named", but we can probably do it later. Repository: rL LLVM

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. > Also, the following code (which is not valid) crashes with ToT trunk, > > @property (nonatomic) int OuterType::InnerType > > > but compiles without any errors with your patch applied. Do you know why > clang doesn't error out? This worked because clang continued

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 79722. arphaman added a comment. The updated patch performs the check in `ShouldEnterDeclaratorScope`. Repository: rL LLVM https://reviews.llvm.org/D26922 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaCXXScopeSpec.cpp test/SemaObjCXX/crash.mm

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26922#608815, @ahatanak wrote: > Yes, I meant ParseDecl:5266. Reading the comment in > ShouldEnterDeclaratorScope, it seemed to me that it shouldn't return true in > this context (when parsing an objective-c). Yes, I agree that it's

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26922#608815, @ahatanak wrote: > Yes, I meant ParseDecl:5266. Reading the comment in > ShouldEnterDeclaratorScope, it seemed to me that it shouldn't return true in > this context (when parsing an objective-c). > > Also, the following code

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-29 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Yes, I meant ParseDecl:5266. Reading the comment in ShouldEnterDeclaratorScope, it seemed to me that it shouldn't return true in this context (when parsing an objective-c). Also, the following code (which is not valid) crashes with ToT trunk, @property (nonatomic)

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26922#607186, @ahatanak wrote: > I wonder whether it is possible to avoid calling > DeclScopeObj.EnterDeclaratorScope at ParseDecl.cpp:5317 instead of fixing > Sema::ActOnCXXEnterDeclaratorScope? > > I believe it's calling

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I wonder whether it is possible to avoid calling DeclScopeObj.EnterDeclaratorScope at ParseDecl.cpp:5317 instead of fixing Sema::ActOnCXXEnterDeclaratorScope? I believe it's calling EnterDeclaratorScope to enable name lookup when a namespace-member variable is

[PATCH] D26922: [ObjC++] Don't enter a C++ declarator context when the current context is an Objective-C declaration

2016-11-21 Thread Alex Lorenz via cfe-commits
arphaman created this revision. arphaman added reviewers: manmanren, ahatanak. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch ensures that Sema won't enter a C++ declarator context when the current context is an Objective-C