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
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
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
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
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
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
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)
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
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
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
10 matches
Mail list logo