ABataev added a comment.
John, thanks a lot for the review!
Committed version has a fix according to your last comment.
Repository:
rL LLVM
http://reviews.llvm.org/D13336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
This revision was automatically updated to reflect the committed changes.
Closed by commit rL254067: [MSVC] 'property' with an empty array in array
subscript expression. (authored by ABataev).
Changed prior to commit:
http://reviews.llvm.org/D13336?vs=41018&id=41125#toc
Repository:
rL LLVM
rjmccall added a comment.
This looks fantastic, thanks for doing all that. Approved with the one minor
change.
Comment at: lib/Sema/SemaPseudoObject.cpp:175
@@ -145,1 +174,3 @@
+PSE->getType(), PSE->getValueKind(), PSE->getObjectKind(),
+PSE->getRBracke
ABataev updated this revision to Diff 41018.
ABataev added a comment.
Update after review
http://reviews.llvm.org/D13336
Files:
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/StmtNodes.td
include/clang/Serialization/ASTBitCodes.h
lib/AST/Expr.c
rjmccall added inline comments.
Comment at: lib/Sema/SemaPseudoObject.cpp:57
@@ +56,3 @@
+ // with a base limits the number of cases here.
+ assert(refExpr->isObjectReceiver());
+
Well, it should be okay to call this on something that doesn't have a base
ABataev updated this revision to Diff 40901.
ABataev marked an inline comment as done.
http://reviews.llvm.org/D13336
Files:
include/clang/AST/DataRecursiveASTVisitor.h
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/StmtNodes.td
include/clang/Ser
ABataev marked an inline comment as done.
Comment at: lib/Sema/SemaPseudoObject.cpp:1627
@@ -1579,1 +1626,3 @@
+cast(Base->IgnoreParens())->getBaseExpr());
+return MSPropertyRefRebuilder(S, BaseOVE->getSourceExpr()).rebuild(E);
} else {
rjmccall wro
rjmccall added inline comments.
Comment at: lib/Sema/SemaPseudoObject.cpp:1627
@@ -1579,1 +1626,3 @@
+cast(Base->IgnoreParens())->getBaseExpr());
+return MSPropertyRefRebuilder(S, BaseOVE->getSourceExpr()).rebuild(E);
} else {
Hmm. Just like the Ob
ABataev added a comment.
John, any comments?
http://reviews.llvm.org/D13336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ABataev updated this revision to Diff 40253.
ABataev marked 3 inline comments as done.
ABataev added a comment.
Update after review
http://reviews.llvm.org/D13336
Files:
include/clang/AST/DataRecursiveASTVisitor.h
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
inclu
rjmccall added inline comments.
Comment at: include/clang/AST/ExprCXX.h:689
@@ +688,3 @@
+/// indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b),
and
+/// p->x[a][b] = i will be turned into p->PutX(a, b, i).
+class MSPropertySubscriptExpr : public Expr {
ABataev updated this revision to Diff 38232.
ABataev marked 4 inline comments as done.
ABataev added a comment.
Update after review
http://reviews.llvm.org/D13336
Files:
include/clang/AST/DataRecursiveASTVisitor.h
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
inclu
rjmccall added a comment.
Needs more tests.
1. Dependent template instantiation.
2. Non-dependent template instantiation.
3. Indexes which are themselves pseudo-objects.
4. Templated getters and setters.
5. Non-POD by-value argument types.
Comment at: include/clang/AST/BuiltinT
ABataev updated this revision to Diff 37854.
ABataev added a comment.
Update after review
http://reviews.llvm.org/D13336
Files:
include/clang/AST/ASTContext.h
include/clang/AST/BuiltinTypes.def
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/Type.cpp
lib/AST
rjmccall added a comment.
I agree with Reid that you should not be adding a DenseMap to Sema for this.
Just build a SubscriptExpr for the syntactic form and have it yield an
expression of pseudo-object type; or you can make your own AST node for it if
that makes things easier.
http://reviews
rnk added a subscriber: rnk.
rnk added a comment.
I spent some time reading through the pseudo-object implementation in clang,
but I still don't understand it. We should ask John if he can review this.
My gut feeling is that we shouldn't have a global DenseMap in Sema just for
this. Should we h
ABataev added a comment.
In http://reviews.llvm.org/D13336#257628, @rnk wrote:
> I think fundamentally we are doing too much declspec property lowering in
> Sema. We might want to back up and figure out how to do it in IRGen. Right
> now we have bugs like this, which are probably more important
rnk added a comment.
I think fundamentally we are doing too much declspec property lowering in Sema.
We might want to back up and figure out how to do it in IRGen. Right now we
have bugs like this, which are probably more important than new functionality:
https://llvm.org/bugs/show_bug.cgi?id=24
ABataev created this revision.
ABataev added a reviewer: rnk.
ABataev added a subscriber: cfe-commits.
MSVC supports 'property' attribute and allows to apply it to the declaration of
an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x
19 matches
Mail list logo