C++: Add one more test.

This commit is contained in:
Cornelius Riemenschneider
2020-11-25 16:24:55 +01:00
parent b4e45ad6cb
commit 0b8403fc05
7 changed files with 18 additions and 0 deletions

View File

@@ -81,6 +81,8 @@
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 |
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:61:34:61:35 | & ... |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:74:10:74:11 | 2 |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:75:35:75:36 | & ... |
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... |
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... |
| test.cpp:4:7:4:7 | a | test.cpp:19:5:19:9 | ... = ... |

View File

@@ -79,6 +79,8 @@
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:61:34:61:35 | & ... | pass_by_ref.cpp:62:10:62:10 | x |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:67:34:67:34 | p |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:68:10:68:10 | p |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:74:10:74:11 | 2 | pass_by_ref.cpp:75:36:75:36 | x |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:75:35:75:36 | & ... | pass_by_ref.cpp:76:10:76:10 | x |
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:9:7:9:7 | a |
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:14:7:14:7 | a |
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:18:7:18:7 | a |

View File

@@ -19,6 +19,7 @@
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:46:11:46:11 | n | pass_by_ref.cpp:46:11:46:11 | n |
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 | pass_by_ref.cpp:60:10:60:11 | 2 |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:66:12:66:18 | 0 |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:74:10:74:11 | 2 | pass_by_ref.cpp:74:10:74:11 | 2 |
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:5:7:5:8 | a0 |
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:13:7:13:7 | b |
| test.cpp:4:7:4:7 | a | test.cpp:19:5:19:9 | ... = ... | test.cpp:19:9:19:9 | 1 |

View File

@@ -155,6 +155,8 @@
| pass_by_ref.cpp:62:10:62:10 | x | |
| pass_by_ref.cpp:67:34:67:34 | p | const address |
| pass_by_ref.cpp:68:10:68:10 | p | |
| pass_by_ref.cpp:75:36:75:36 | x | non-const address |
| pass_by_ref.cpp:76:10:76:10 | x | |
| test.cpp:5:3:5:3 | a | |
| test.cpp:5:7:5:8 | a0 | |
| test.cpp:6:3:6:3 | b | |

View File

@@ -67,3 +67,11 @@ int * noTemporaryObject() {
constPointerReferenceParameter(p);
return p;
}
void pointerRvalueReferenceParameter(int * && pRef);
int temporaryObject2() {
int x = 2;
pointerRvalueReferenceParameter(&x);
return x;
}

View File

@@ -122,6 +122,8 @@
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:62:10:62:10 | x |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:67:34:67:34 | p |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:68:10:68:10 | p |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:75:36:75:36 | x |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:76:10:76:10 | x |
| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |

View File

@@ -58,6 +58,7 @@
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:54:10:54:10 | i |
| pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:62:10:62:10 | x |
| pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:68:10:68:10 | p |
| pass_by_ref.cpp:74:7:74:7 | x | pass_by_ref.cpp:76:10:76:10 | x |
| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |