Commit Graph

12966 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
59936c8642 Merge pull request #16151 from MathiasVP/use-shared-typeflow-lib
C++: Use the shared typeflow library
2024-04-10 12:02:03 +01:00
Geoffrey White
138975e4a8 C++: Add ZMQ summary models. 2024-04-09 18:10:15 +01:00
Geoffrey White
783ce48538 C++: Add test cases for ZMQ summary models. 2024-04-09 18:08:56 +01:00
Mathias Vorreiter Pedersen
8a92a4250f C++: Autoformat. 2024-04-09 17:53:33 +01:00
Mathias Vorreiter Pedersen
a53ef495ee C++: Simplify 'hasExactBufferType' and add comments. 2024-04-09 16:04:20 +01:00
Mathias Vorreiter Pedersen
291cc0a671 C++: Anonymous namespaces provide internal linkage. 2024-04-09 15:25:13 +01:00
Mathias Vorreiter Pedersen
2a7420ce11 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TypeFlow.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-04-09 15:00:23 +01:00
Geoffrey White
1264e6e292 C++: Fit the function pointer tests better with what is and isn't working. 2024-04-09 14:57:15 +01:00
Jeroen Ketema
46c44b4dc0 C++: Update QLDoc of IRDeclarationEntry to reflect current reality 2024-04-09 15:15:41 +02:00
Jeroen Ketema
e821a62b44 C++: Update expected test results 2024-04-09 15:15:41 +02:00
Mathias Vorreiter Pedersen
e9cd2dc9e1 C++: Implement 'lambdaCreation' and 'lambdaCall' for models-as-data. 2024-04-09 14:05:32 +01:00
Geoffrey White
4d5f158652 C++: Pivot ReturnKind solution to derive types from SSA + AST, rather than SSA + MAD. 2024-04-09 13:49:21 +01:00
Geoffrey White
13734d4e62 C++: Improve indirectionForModelledFunction. 2024-04-09 12:06:03 +01:00
Geoffrey White
70bb29581d C++: Test failures. 2024-04-09 11:53:33 +01:00
Mathias Vorreiter Pedersen
448a9015c0 C++: Compute the number of indirections from MaD using a new predicate. 2024-04-09 10:33:06 +01:00
Mathias Vorreiter Pedersen
21592563cb C++: Define 'ReturnKind's in terms of SSA instead of 'Function'. 2024-04-09 10:32:31 +01:00
Mathias Vorreiter Pedersen
c325a79206 C++: Ensure 'isConditionalTemporaryDestructorCall' only holds when the reused expression is a temporary. 2024-04-09 09:32:54 +01:00
Mathias Vorreiter Pedersen
17c8fa3e84 Update cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-04-09 09:27:44 +01:00
Mathias Vorreiter Pedersen
386580fc94 C++: Accept test changes. 2024-04-08 21:26:12 +01:00
Mathias Vorreiter Pedersen
b2002a981a C++: Use the shared typeflow library to determine whether a pointer points to a buffer or an object. 2024-04-08 21:25:05 +01:00
Mathias Vorreiter Pedersen
c389611e5c C++: Add spurious dataflow test. 2024-04-08 21:24:59 +01:00
codeqlhelper@gmail.com
334c0d0449 ... 2024-04-09 02:06:06 +08:00
codeqlhelper
fc26e148fd Create 2024-04-09-reduce-FP.md 2024-04-09 02:00:52 +08:00
Geoffrey White
e3ce7c608b C++: Fix indirection ambiguity in the test. 2024-04-08 18:27:51 +01:00
Geoffrey White
087d689997 C++: Additional test cases. 2024-04-08 18:18:30 +01:00
codeqlhelper
af2a7eadc3 Reduce false alarms of InconsistentNullnessTesting.ql
We should ignore `checked` in a macro to avoid too many false alarms,
2024-04-09 00:07:40 +08:00
codeqlhelper
fb15a4ea11 Reduce the false alarms of GlobalUseBeforeInit.ql 2024-04-09 00:03:05 +08:00
Geoffrey White
c0c1ab7006 C++: Fix code scanning warnings. 2024-04-08 16:05:55 +01:00
Geoffrey White
06d369ba11 C++: Remove untested PostUpdateNode code for now, and field cases that don't work anyway. 2024-04-08 16:05:18 +01:00
Geoffrey White
b2b2c2016c C++: Update more QLDoc. 2024-04-08 16:04:23 +01:00
Mathias Vorreiter Pedersen
4fa53b63ae Merge branch 'main' into destructors-for-unconditional-unnamed 2024-04-08 15:42:35 +01:00
Mathias Vorreiter Pedersen
9c25ce4079 C++: Add testcase with two destructor calls without a temporary object expression at the top-level. 2024-04-08 15:35:33 +01:00
Mathias Vorreiter Pedersen
b581a9ba04 C++: Add example with missing destructor calls on parameters passed by value. 2024-04-08 13:49:05 +01:00
Mathias Vorreiter Pedersen
febd06063a C++: Add testcase where two destructor calls are remapped to a temporary object expression. 2024-04-08 13:03:51 +01:00
Geoffrey White
ec515f967d C++: Update QLDoc. 2024-04-08 11:57:35 +01:00
Mathias Vorreiter Pedersen
9917c3c5ba C++: Add change note. 2024-04-08 10:10:31 +01:00
Mathias Vorreiter Pedersen
fae002fbb7 C++: Accept test changes. 2024-04-08 10:10:31 +01:00
Mathias Vorreiter Pedersen
4831ee65b6 C++: Enable sound IR. 2024-04-08 10:10:31 +01:00
Mathias Vorreiter Pedersen
d40fa4cfba C++: Accept test changes. 2024-04-07 15:50:16 +01:00
Mathias Vorreiter Pedersen
8a6a60e59b C++: Also handle destructor calls on converted expressions in PrintAST. 2024-04-07 15:49:50 +01:00
Mathias Vorreiter Pedersen
fcd0e9999c C++: Accept test changes. 2024-04-07 15:49:27 +01:00
Mathias Vorreiter Pedersen
89eaadd76f C++: Move destructor calls from expressions with a temporary object conversion to the temporary object conversion. 2024-04-07 15:48:38 +01:00
Mathias Vorreiter Pedersen
a0de95dc44 C++: Add testcases that produces an 'missingOperandType' and 'missingPhiOperand' consistency errors. 2024-04-07 14:26:30 +01:00
Mathias Vorreiter Pedersen
557555eb71 C++: Make Code Scanning happy. 2024-04-05 19:03:03 +01:00
Mathias Vorreiter Pedersen
777755a241 C++: Add alias models for 'fopen'. 2024-04-05 19:02:23 +01:00
Mathias Vorreiter Pedersen
45e71543b4 C++: Accept test changes. 2024-04-05 18:08:25 +01:00
Mathias Vorreiter Pedersen
54e4103e71 C++: Fix another multiple parents problem. 2024-04-05 18:07:53 +01:00
Mathias Vorreiter Pedersen
955f9c735c C++: Add a failing testcase. 2024-04-05 18:05:30 +01:00
Mathias Vorreiter Pedersen
4c01c06f0c C++: Accept test changes. 2024-04-05 14:49:22 +01:00
Mathias Vorreiter Pedersen
f1d2dac648 C++: Fix a bug where the destructor attached to a 'new' expression would
have multiple parents (the 'new' expression, the call to 'operator new',
and the size expression). This happens because the latter two are
'TranslatedExpr's that return the 'new' expression as their expression
even though they don't technically represent the translation of this
expression.
To prevent this bug we tell the IR construction that the latter two
handle their destructors explicitly which means that IR construction
doesn't try to synthesize them.
2024-04-05 14:46:27 +01:00