Commit Graph

4510 Commits

Author SHA1 Message Date
Geoffrey White
13d9d5dc45 C++: Use [,] more in general. 2020-12-03 18:50:43 +00:00
Geoffrey White
2a4fba0ff9 C++: Use [,] more in models. 2020-12-03 17:27:31 +00:00
Geoffrey White
d20619d779 Merge branch 'main' into modelchanges3 2020-12-02 14:45:54 +00:00
Mathias Vorreiter Pedersen
203bbdd84f Merge pull request #4741 from criemen/port-dataflow-tests
C++: Port dataflow tests to inline expectations test library.
2020-12-02 10:25:52 +01:00
Robert Marsh
8c1f15b261 C++: refactor getLowerBoundsImpl for perfomance 2020-12-01 14:42:37 -08:00
Geoffrey White
7c00477736 C++: Combine getOutputParameterIndex and isOutputStream. 2020-12-01 16:27:30 +00:00
Geoffrey White
c9c159ad0b C++: Autoformat. 2020-12-01 15:37:26 +00:00
Geoffrey White
799b932c17 C++: Restore QLDoc on deprecated predicates. 2020-12-01 15:21:06 +00:00
Geoffrey White
79f32b0e26 C++: Autoformat. 2020-12-01 10:51:51 +00:00
Geoffrey White
9c277b3cb1 C++: Fix a small bug in the ArrayFunction model for FormattingFunction. 2020-11-30 17:55:25 +00:00
Geoffrey White
b52ddbfc42 C++: Implement isOutputStream, isOutputString for UserDefinedFormattingFunction as well. 2020-11-30 17:55:24 +00:00
Geoffrey White
c3b16a5fd2 C++: Implement FormattingFunction isOutputStream, isOutputString so that subclasses don't need to be accessed for this information, and can be private. 2020-11-30 17:55:23 +00:00
Anders Schack-Mulligen
8f2094f0bf Autoformat. 2020-11-30 14:42:38 +01:00
Anders Schack-Mulligen
931322e4c5 Merge pull request #4668 from aschackmull/dataflow/refactor-pruning
Dataflow: Refactor pruning stages.
2020-11-30 09:37:04 +01:00
ihsinme
d088d5b0f3 CPP: Add query for CWE-191
into experimental this reveals a dangerous comparison
2020-11-28 15:52:00 +03:00
Geoffrey White
905b04a6fb C++: Model classes in StdString.qll. 2020-11-27 19:12:01 +00:00
Cornelius Riemenschneider
644a0fac98 C++: Port dataflow/dataflow-tests to inline expectations test library. 2020-11-27 16:03:15 +01:00
Anders Schack-Mulligen
fec9758252 Dataflow: Sync. 2020-11-27 12:16:43 +01:00
Jonas Jensen
8069e7b031 C++: Downgrade two queries to recommendation
The `cpp/local-variable-hides-global-variable` doesn't seem right as a
warning without some additional context. For example, is the local
variable and the global variable used in the same function body, and
do they have similar enough types that it would be possible to confuse
them.

The `cpp/missing-header-guard` query enforces good style and helps with
compilation speed, but AFAIK it has never flagged a correctness issue.
Therefore I think it should be a recommendation.
2020-11-27 10:45:03 +01:00
Jonas Jensen
a48235e871 Merge pull request #4730 from MathiasVP/definitionHasPhiNode-join-order-fix
C++: Fix join order in definitionHasPhiNode
2020-11-27 09:54:37 +01:00
Jonas Jensen
edb57c2da0 Merge pull request #4731 from criemen/remove-cpp-abstract
C++: Remove uses of abstract from the standard library.
2020-11-27 09:53:24 +01:00
Jonas Jensen
ad4b2beafa Merge pull request #4727 from criemen/remove-abstract-classes
C++/C#/JS/Python/Java XML.qll: Remove abstract from class hierarchy.
2020-11-27 08:17:21 +01:00
Mathias Vorreiter Pedersen
a4c060a4c6 Merge pull request #4729 from MathiasVP/safe-external-api-function-use-model-interfaces-only
C++: Use model interfaces in DefaultSafeExternalAPIFunction
2020-11-26 16:00:19 +01:00
Cornelius Riemenschneider
f6c3c2bdcc C++: Auto-format Type.qll. 2020-11-26 11:45:49 +01:00
Mathias Vorreiter Pedersen
b02ac7f523 C++: Use SideEffectFunction (instead of ArrayFunction) to define DefaultSafeExternalAPIFunction. 2020-11-26 11:02:47 +01:00
Cornelius Riemenschneider
5d80417854 Update cpp/ql/src/semmle/code/cpp/Type.qll
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2020-11-26 10:39:17 +01:00
Cornelius Riemenschneider
ba32459adf C++: Remove uses of abstract from the standard library. 2020-11-26 10:17:40 +01:00
Mathias Vorreiter Pedersen
5f4ad3ad7d C++: Fix join order in definitionHasPhiNode 2020-11-26 10:07:44 +01:00
Jonas Jensen
6fecc38004 Merge pull request #4726 from MathiasVP/revert-4558
C++: Revert 4558
2020-11-26 08:44:32 +01:00
Mathias Vorreiter Pedersen
c595baf1e3 C++: Remove INTERNAL from qldoc now that the Pure model implementations are private. 2020-11-25 21:07:47 +01:00
Geoffrey White
bc71c72084 Merge pull request #4728 from criemen/delete-magicdraw
C++: Remove MagicDraw.qll
2020-11-25 17:56:37 +00:00
Mathias Vorreiter Pedersen
7730f5dfcf C++: Use model interfaces in SafeExternalAPIFunction and make the three previosuly-used implementation models private. 2020-11-25 18:20:55 +01:00
Cornelius Riemenschneider
3bfb398516 Autoformat XML.qll. 2020-11-25 18:20:50 +01:00
Cornelius Riemenschneider
acf6c218bc C++: Remove MagicDraw.qll 2020-11-25 17:36:30 +01:00
Cornelius Riemenschneider
7eec988fb5 XML.qll: Remove abstract from class hierarchy. 2020-11-25 17:22:03 +01:00
Cornelius Riemenschneider
b4e45ad6cb C++: Address review. 2020-11-25 16:24:25 +01: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
Cornelius Riemenschneider
7f13d4c356 C++: Improve EscapesTree analysis in the presence of temporary objects. 2020-11-25 10:41:15 +01:00
Jonas Jensen
5f0141953d Merge pull request #4644 from MathiasVP/unsafe-use-of-this-query
C++: Add 'unsafe use of this' query
2020-11-25 08:40:12 +01:00
Jonas Jensen
48460e3e45 Merge pull request #4716 from criemen/escapestree-code-cleanup
C++: Simplify and generalize EscapesTree::addressMayEscapeMutablyAt
2020-11-25 08:31:33 +01:00
Robert Marsh
0cd6941a21 C++: Filter out lower bounds on overflowing exprs
Fixes performance issues where multiple lower bounds would be
computed for overflowing expressions
2020-11-24 12:57:11 -08:00
Robert Marsh
9b07782d19 Merge pull request #4634 from geoffw0/modelchanges2
C++: Make classes in models.implementations private
2020-11-24 15:18:10 -05:00
Geoffrey White
71a8ac5183 C++: Autoformat. 2020-11-24 18:42:18 +00:00
Geoffrey White
8184f76d1f C++: Sync identical files. 2020-11-24 16:29:14 +00:00
Mathias Vorreiter Pedersen
648acc3bfc C++: Prevent IR re-evaluation by importing GVN. 2020-11-24 17:04:54 +01:00
Cornelius Riemenschneider
026abae323 C++: Simplify some more. 2020-11-24 17:00:47 +01:00
Cornelius Riemenschneider
7983b16e84 C++: Simplify and generalize EscapesTree::addressMayEscapeMutablyAt predicate. 2020-11-24 11:35:18 +01:00
Mathias Vorreiter Pedersen
08f8660b17 C++/C#: Add pragma[noinline] to hasIndex predicates. 2020-11-24 10:45:02 +01:00
Geoffrey White
7015a9cf53 C++: Un-private a few classes that are now used by the current DefaultSafeExternalAPIFunction implementation. 2020-11-23 14:47:22 +00:00
Mathias Vorreiter Pedersen
a7644db762 C++: Use the new names in IR dataflow. Turns out DataFlowCall had its own implementation of getArgument already (which didn't handle qualifiers). The predicate wasn't used anywhere, so I simply removed it, as a better predicate is now available on the base class of DataFlowCall. 2020-11-21 01:00:59 +01:00