summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx1z-eval-order.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-3/+3
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. llvm-svn: 327738
* Switch to a different workaround for unimplementability of P0145R3 in MS ABIs.Richard Smith2016-09-291-33/+22
| | | | | | | | | | | | | | | | | | | Instead of ignoring the evaluation order rule, ignore the "destroy parameters in reverse construction order" rule for the small number of problematic cases. This only causes incorrect behavior in the rare case where both parameters to an overloaded operator <<, >>, ->*, &&, ||, or comma are of class type with non-trivial destructor, and the program is depending on those parameters being destroyed in reverse construction order. We could do a little better here by reversing the order of parameter destruction for those functions (and reversing the argument evaluation order for all direct calls, not just those with operator syntax), but that is not a complete solution to the problem, as the same situation can be reached by an indirect function call. Approach reviewed off-line by rnk. llvm-svn: 282777
* Re-commit r282556, reverted in r282564, with a fix to CallArgList::addFrom toRichard Smith2016-09-281-36/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | function correctly when targeting MS ABIs (this appears to have never mattered prior to this change). Update test case to always cover both 32-bit and 64-bit Windows ABIs, since they behave somewhat differently from each other here. Update test case to also cover operators , && and ||, which it appears are also affected by P0145R3 (they're not explicitly called out by the design document, but this is the emergent behavior of the existing wording). Original commit message: P0145R3 (C++17 evaluation order tweaks): evaluate the right-hand side of assignment and compound-assignment operators before the left-hand side. (Even if it's an overloaded operator.) This completes the implementation of P0145R3 + P0400R0 for all targets except Windows, where the evaluation order guarantees for <<, >>, and ->* are unimplementable as the ABI requires the function arguments are evaluated from right to left (because parameter destructors are run from left to right in the callee). llvm-svn: 282619
* Revert r282556. This change made several bots unhappy.Richard Smith2016-09-281-42/+32
| | | | llvm-svn: 282564
* P0145R3 (C++17 evaluation order tweaks): evaluate the right-hand side ofRichard Smith2016-09-271-32/+42
| | | | | | | | | | | | | assignment and compound-assignment operators before the left-hand side. (Even if it's an overloaded operator.) This completes the implementation of P0145R3 + P0400R0 for all targets except Windows, where the evaluation order guarantees for <<, >>, and ->* are unimplementable as the ABI requires the function arguments are evaluated from right to left (because parameter destructors are run from left to right in the callee). llvm-svn: 282556
* Defend test against differences between 32-bit and 64-bit MSABI manglings.Richard Smith2016-09-271-3/+3
| | | | llvm-svn: 282463
* P0145R3 (C++17 evaluation order tweaks): evaluate the base expression beforeRichard Smith2016-09-261-16/+16
| | | | | | the pointer-to-member expression in calls through .* and ->* expressions. llvm-svn: 282457
* P0145R3 (C++17 evaluation order tweaks): consistently emit the LHS of arrayRichard Smith2016-09-261-0/+214
subscripting before the RHS, regardless of which is the base and which is the index. llvm-svn: 282453
OpenPOWER on IntegriCloud