mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Fix duplication for indirect exprs similar to how we fixed it in #15410.
This commit is contained in:
@@ -2,7 +2,7 @@ void take_const_ref_int(const int &);
|
||||
|
||||
void test_materialize_temp_int()
|
||||
{
|
||||
take_const_ref_int(42); // $ asExpr=42 numberOfNodes="42: 2" asIndirectExpr=42 numberOfIndirectNodes="42: 2"
|
||||
take_const_ref_int(42); // $ asExpr=42 numberOfNodes="42: 2" asIndirectExpr=42
|
||||
}
|
||||
|
||||
struct A {};
|
||||
@@ -11,7 +11,7 @@ A get();
|
||||
void take_const_ref(const A &);
|
||||
|
||||
void test1(){
|
||||
take_const_ref(get()); // $ asExpr="call to get" numberOfNodes="call to get: 2" asIndirectExpr="call to get" numberOfIndirectNodes="call to get: 2"
|
||||
take_const_ref(get()); // $ asExpr="call to get" numberOfNodes="call to get: 2" asIndirectExpr="call to get"
|
||||
}
|
||||
|
||||
void take_ref(A &);
|
||||
|
||||
Reference in New Issue
Block a user