[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-08-26 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 217289. domdom added a comment. Rebased onto master, clang format the patch. Merge conflict resolve by having the bitcast of the field reference happening after recording access index. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-08-22 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom added a comment. Thanks @aaron.ballman! I will need someone to commit this for me :) Cheers, Dom CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/ https://reviews.llvm.org/D62571 ___ cfe-commits mailing list

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-08-20 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom added a comment. Ping! Cheers, Dom CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/ https://reviews.llvm.org/D62571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-07-08 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 208550. domdom added a comment. Thank you for catching that @aaron.ballman! I forgot to update the test after the running clang-format. I thought I ran the tests again before submitting, but I guess I didn't :P Thanks again! CHANGES SINCE LAST ACTION

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-06-19 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom added a comment. In D57086#1550514 , @aaron.ballman wrote: > In D57086#1549632 , @domdom wrote: > > > clang-format the patch > > > Thanks! Do you need someone to commit on your behalf? You are very

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-06-18 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 205501. domdom added a comment. clang-format the patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 Files: clang/include/clang/AST/Stmt.h clang/lib/CodeGen/CGStmt.cpp clang/lib/Parse/ParseStmt.cpp

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-06-18 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 205495. domdom added a comment. clang-formatted the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/ https://reviews.llvm.org/D62571 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGenCXX/ms-union-member-ref.cpp Index:

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-06-10 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 203775. domdom added a comment. Sorry I it's taken me a while to get back to this work. I've rebased the changes and taken advantage of the refactoring to stop modifying the CompoundStmt after creating it. This definitely simplified the changes required in

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-05-29 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom created this revision. domdom added a reviewer: asl. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case. Repository: rC Clang

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-02-04 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 185196. domdom added a comment. Switched getIndexOfLastNonNullStmt to return Optional instead of Stmt* as per comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 Files:

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-30 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom marked an inline comment as not done. domdom added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1259 + // the index of the last one. + unsigned getLastNonNullStmt() const { +assert(!body_empty() && "getLastNonNullStmt"); aaron.ballman

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-30 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 184414. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 Files: clang/include/clang/AST/Stmt.h clang/lib/CodeGen/CGStmt.cpp clang/lib/Parse/ParseStmt.cpp clang/lib/Sema/SemaExpr.cpp

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-30 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 184413. domdom marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 Files: clang/include/clang/AST/Stmt.h clang/lib/CodeGen/CGStmt.cpp Index: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-28 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 184001. domdom added a comment. Thanks for your comments, @aaron.ballman. I've addressed the comments and added a test case as suggested. This revealed an issue with the code-gen side of things, so I fixed that and added another test case for that as well.

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-22 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom updated this revision to Diff 183043. domdom added a comment. Formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 Files: clang/lib/Parse/ParseStmt.cpp clang/lib/Sema/SemaExpr.cpp clang/test/Sema/statements.c Index:

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-22 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom created this revision. domdom added reviewers: lattner, rsmith. Herald added a subscriber: cfe-commits. Ignore trailing NullStmts in compound expressions when determining the result type and value. This is to match the GCC behavior which ignores semicolons at the end of compound