Commit Graph

40 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
5da57cd2b4 C++: Accept test changes. 2025-01-16 00:39:29 +00:00
Mathias Vorreiter Pedersen
9d3bc7f510 C++: Accept test changes. 2025-01-16 00:39:26 +00:00
Mathias Vorreiter Pedersen
1e33593c79 C++: Accept test changes. 2025-01-16 00:39:23 +00:00
Mathias Vorreiter Pedersen
2e3d3494de C++: Accept test changes. 2025-01-16 00:39:20 +00:00
Mathias Vorreiter Pedersen
ccca0b6ba4 C++: Also update syntax-zoo tests. 2024-11-18 15:56:41 +00:00
Jeroen Ketema
ca10953761 C++: Update syntax zoo expected test results 2024-09-10 21:25:29 +02:00
Mathias Vorreiter Pedersen
b6ddb97e40 C++: Accept test changes. 2024-04-04 20:02:02 +01:00
Jeroen Ketema
6972f9b31d C++: Update syntax-zoo expected test results 2024-03-06 09:34:47 +01:00
Mathias Vorreiter Pedersen
bba152da13 Merge branch 'main' into ir-for-vacuous-destructor-calls 2024-02-27 15:42:46 +00:00
Mathias Vorreiter Pedersen
dc3b78dd7c C++: Accept more test changes. 2024-02-27 14:30:19 +00:00
Robert Marsh
ebe6ee5257 C++: accept test changes from extractor fixes 2024-02-22 16:44:19 +00:00
Robert Marsh
1b571f8992 C++: Accept test changes 2024-02-09 22:32:08 +00:00
Mathias Vorreiter Pedersen
df181f2dc4 C++: Accept more test changes. 2024-02-07 14:50:18 +00:00
Alex Eyers-Taylor
e8dfecc4a4 CPP: Fix test result 2023-09-07 12:49:13 +01:00
Mathias Vorreiter Pedersen
65c7a504b2 C++: Accept test changes. 2023-03-29 15:08:50 +01:00
Jeroen Ketema
4faede0e2c C++: Silence some more bogus consistency errors in syntax zoo
These were due to several functions occurring that would have the same TRAP key.
By making the functions static or wrapping the defining class in an anonymous
namespace the TRAP keys will differ from each other.
2023-03-03 12:07:33 +01:00
Jeroen Ketema
f649def3f8 C++: Silence a number of bogus consistency errors in syntax zoo
These were due to several functions occurring that would have the same TRAP
key. By making the functions static the TRAP keys will differ from each other.
2023-03-03 11:16:19 +01:00
Mathias Vorreiter Pedersen
ff6e8a285d C++: Model semantics of '__except' condition in IR. 2022-12-21 14:08:26 +00:00
Mathias Vorreiter Pedersen
e6a03a6152 C++: Fix exception handling for '__try __except'. 2022-12-21 14:08:26 +00:00
Mathias Vorreiter Pedersen
d2964a7d4a C++: Also handle '__finally' blocks. 2022-12-20 13:28:33 +00:00
Mathias Vorreiter Pedersen
3c8efa88e0 C++: Handle Microsoft '__try __except' in the existing 'TryStmt' IR logic. 2022-12-20 13:28:28 +00:00
Jeroen Ketema
584a0189a8 C++: Update test results after changes 2022-08-19 21:50:45 +02:00
Robert Marsh
fe52dd93ef C++: sync and accept new consistency test 2022-04-29 15:29:07 -04:00
Paolo Tranquilli
0547e4ccf2 update further test with new locations 2021-11-23 15:28:15 +00:00
Mathias Vorreiter Pedersen
4c3a26fea8 Revert "Merge pull request #4558 from rdmarsh2/rdmarsh2/cpp/remove-initialize-nonlocal"
This reverts commit 08efd7fbd9, reversing
changes made to cb8c5e8cca.
2020-11-25 15:51:52 +01:00
Robert Marsh
14f1fa50f1 Merge branch 'main' into rdmarsh2/cpp/remove-initialize-nonlocal
Accept test changes from IR temporaries and block ordering
2020-11-10 11:14:26 -08:00
Robert Marsh
c00587d2cb C++/C#: Conflated memory as IR dump annotation
Removes the IR consistency checks for conflated memory and marks
instructions that have a conflated result with a percent sign (%)
instead. This avoids reimplementing part of the alias analysis logic
in the consistency check.
2020-11-09 14:55:47 -08:00
Robert Marsh
7d7b0eaa7b C++: accept test changes
The conflation-related changes result from aliased accesses for which a
precise Phi node is generated.
2020-10-27 09:33:28 -07:00
Dave Bartolomeo
ee18db7b36 Fix IR for member accesses on prvalues
This fixes the IR generation for member accesses where the qualifier is a prvalue that is _not_ the load of a `TemporaryObjectExpr`. We synthesize a temporary variable during IR generation instead. It fits into the IR construction code at the same spot as `TranslatedLoad`, since it's basically the opposite of `TranslatedLoad` (prvalue->glvalue instead of vice versa). Note that array prvalues require special treatment.

This fixes some consistency errors in the `syntax-zoo`. It introduces three new ones in `dataflow-ir-consistency.expected`, but those are along the same lines as tons of existing failures.
2020-10-21 13:32:15 -04:00
Dave Bartolomeo
4ba281731c Fix IR generation for member access with a prvalue on the RHS
For historical reasons, the extractor marks the temporary object expression used as the qualifier of a member access as a prvalue(load), even though the current C++ standard says that the temporary object materialization results in a glvalue. Added some special handling to ignore the load for both field accesses and member function calls.

This fixes all of the consistency failures in our regular tests, and all of the related failures in `syntax-zoo` other than the ones that deal with pointers-to-member, which aren't really supported yet anyway.
2020-10-20 12:53:47 -04:00
Dave Bartolomeo
735c657326 IR consistency checks for FieldAddress and this arguments that are not actually addresses.
Exposes failures in existing tests. Also added a small test case for `FieldAddress` on a prvalue.
2020-10-20 10:32:28 -04:00
Dave Bartolomeo
bf8340f102 Fix test expectations in syntax-zoo 2020-10-07 10:26:02 -04:00
Robert Marsh
1c9b6f0a48 Merge branch 'master' into ir-this-parameter-2
Accept test changes - dataflow changes are all positive
2020-06-16 11:28:49 -07:00
Dave Bartolomeo
fecffab8e7 C++: Fix consistency error
`TTranslatedAllocationSideEffects` wasn't limiting itself to functions that actually have IR, so it was getting used even in template definitions.
2020-06-15 10:47:00 -04:00
Dave Bartolomeo
8cbc7e8654 C++/C#: Improve consistency failure result messages
Some of our IR consistency failure query predicates already produced results in the schema as an `@kind problem` query, including `$@` replacements for the enclosing `IRFunction` to make it easier to figure out which function to dump when debugging. This change moves the rest of the query predicates in `IRConsistency.qll` to do the same. In addition, it wraps each call to `getEnclosingIRFunction()` to return an `OptionalIRFunction`, which can be either a real `IRFunction` or a placeholder in case `getEnclosingIRFunction()` returned no results. This exposes a couple new consistency failures in `syntax-zoo`, which will be fixed in a subsequent commit.

This change also deals with consistency failures when the enclosing `IRFunction` has more than one `Function` or `Location`. For multiple `Function`s, we concatenate the function names. For multiple `Location`s, we pick the first one in lexicographical order. This changes the number of results produced in the existing tests, but does't change the actual number of problems.
2020-06-15 10:46:46 -04:00
Robert Marsh
0d2f8f3825 Merge branch 'master' into ir-this-parameter-2 2020-06-05 13:52:56 -07:00
Robert Marsh
45e555cff0 C++: accept inconsistency with unreachable exit block 2020-05-29 14:43:48 -07:00
Robert Marsh
6c9051ae6f C++: accept consistency fixes 2020-05-29 09:49:28 -07:00
Dave Bartolomeo
3758f3c48d C++: Fix syntax-zoo test output 2020-05-18 18:07:52 -04:00
Dave Bartolomeo
09d1da2f7a C++/C#: Rename sanity -> consistency
I did both of these languages together because they share some of the changed code via `identical-files.json`.
2020-05-11 13:29:52 -04:00