-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #131: Global DecompositionDecl transformation was wrong.
A global DecompositionDecl which involves a callExpr introduces the decomposed variables. With this, the global VarDecl matcher matched multiple times which resulted in an messed up transformation. Added a limit to the matcher to skip the decomposed variable declarations.
- Loading branch information
Andreas Fertig
committed
Mar 1, 2019
1 parent
6c37c6a
commit 4783d94
Showing
12 changed files
with
122 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int Func() { return 2; } | ||
|
||
int v = /* */ Func(); // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
int Func() | ||
{ | ||
return 2; | ||
} | ||
|
||
|
||
int v = Func(); | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include <tuple> | ||
|
||
std::tuple<int, float> foo(); | ||
|
||
auto [a, b] = foo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <tuple> | ||
|
||
std::tuple<int, float> foo(); | ||
|
||
|
||
std::tuple<int, float> __foo5 = foo(); | ||
std::tuple_element<0, std::tuple<int, float> >::type& a = std::get<0ul>(__foo5); | ||
std::tuple_element<1, std::tuple<int, float> >::type& b = std::get<1ul>(__foo5); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <tuple> | ||
|
||
std::tuple<int, float> foo; | ||
|
||
auto [a, b] = foo; | ||
auto& [ra, rb] = foo; | ||
|
||
|
||
char c[3]{}; | ||
|
||
auto [x, y, z] = c; | ||
|
||
auto& [cx, cy, cz] = c; | ||
|
||
|
||
std::tuple<int, float> Func(); | ||
|
||
const auto& [fa, fb] = Func(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include <tuple> | ||
|
||
std::tuple<int, float> foo = std::tuple<int, float>(); | ||
|
||
|
||
std::tuple<int, float> __foo5 = std::tuple<int, float>(foo); | ||
std::tuple_element<0, std::tuple<int, float> >::type& a = std::get<0ul>(__foo5); | ||
std::tuple_element<1, std::tuple<int, float> >::type& b = std::get<1ul>(__foo5); | ||
|
||
std::tuple<int, float> & __foo6 = foo; | ||
std::tuple_element<0, std::tuple<int, float> >::type& ra = std::get<0ul>(__foo6); | ||
std::tuple_element<1, std::tuple<int, float> >::type& rb = std::get<1ul>(__foo6); | ||
|
||
|
||
|
||
char c[3] = {'\0', '\0', '\0'}; | ||
|
||
|
||
char __c11[3] = {c[0], c[1], c[2]}; | ||
char x = __c11[0]; | ||
char y = __c11[1]; | ||
char z = __c11[2]; | ||
|
||
|
||
char (&__c13)[3] = c; | ||
char& cx = __c13[0]; | ||
char& cy = __c13[1]; | ||
char& cz = __c13[2]; | ||
|
||
|
||
|
||
std::tuple<int, float> Func(); | ||
|
||
|
||
const std::tuple<int, float> & __Func18 = Func(); | ||
std::tuple_element<0, const std::tuple<int, float> >::type& fa = std::get<0ul>(__Func18); | ||
std::tuple_element<1, const std::tuple<int, float> >::type& fb = std::get<1ul>(__Func18); | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters