Commit Graph

23 Commits

Author SHA1 Message Date
Pavel Avgustinov
628edc9577 definitions.qll: Tidy up handling of type mentions 2018-08-14 16:38:57 -07:00
Pavel Avgustinov
3bc06627e1 Simplify definitions.qll for C++. 2018-08-14 16:38:56 -07:00
Pavel Avgustinov
382ae85431 Simplify location handling for C++ locations. 2018-08-14 16:38:56 -07:00
Geoffrey White
031964e853 Merge pull request #30 from jbj/incomplete-parity-check-medium
C++: Downgrade cpp/incomplete-parity-check from high to medium precision [CPP-236]
2018-08-14 15:19:02 +01:00
Jonas Jensen
da02c45102 Merge pull request #36 from rdmarsh2/rdmarsh/cpp/add-security-tags
C++: add security tags to more queries
2018-08-14 12:07:28 +02:00
Pavel Avgustinov
64338b0581 Element::getEnclosingElement: Skip macro information.
Previously, we would try to find an element enclosing each macro
access. This is not in general well-defined, especially in the
context of template instantiations -- macros are a lexing-time
concept, and don't map cleanly onto AST elements.
2018-08-13 22:16:49 +01:00
Robert Marsh
9cf599fb59 C++: remove some tags in response to PR comments 2018-08-13 10:25:10 -07:00
semmle-qlci
945413a791 Merge pull request #42 from tibbes/qhelp/fix-links
Approved by jbj, xiemaisi
2018-08-10 13:00:17 +01:00
semmle-qlci
bbee9a860b Merge pull request #38 from jbj/ir-Instruction-hasUse
Approved by dave-bartolomeo
2018-08-10 12:03:26 +01:00
Julian Tibble
98e866e967 C++, JS: fix broken links in query help 2018-08-10 08:40:22 +01:00
Jonas Jensen
c92111d552 C++: Accept test changes: IR sanity query added 2018-08-10 09:04:52 +02:00
Robert Marsh
31819be32d C++: add security tags to some format queries 2018-08-09 13:31:29 -07:00
Jonas Jensen
961a7dcf15 C++ IR: Remove Instruction.hasUse predicate
Now that it's been simplified to be the same as `getOperand`, it doesn't
seem to have a purpose.
2018-08-09 15:36:52 +02:00
Jonas Jensen
8c06a68835 C++ IR: Remove redundant check for same function
The check that an instruction is in the same function as its operands is
hopefully redundant and can be removed. Just to be sure, I've added the
check to a sanity query.

This check turned out to cause bad performance in the alias analysis
because it got inlined into `AliasAnalysis::resultEscapes` and then
pulled out to a loop-invariant predicate that got a bad join order. With
this check removed, the `ssa/AliasAnalysis.qll` file is orders of
magnitude faster.
2018-08-09 15:36:52 +02:00
Jonas Jensen
5c4292932f C++: Move LGTM suites to submodule
This follows what's been done for JavaScript. The `cpp-alerts-lgtm`
suite is now empty and will be auto-generated when building a dist.

This commit has no effect in itself, but these files need to be in place
when the corresponding changes are made in Semmle/code.
2018-08-09 10:35:05 +02:00
Robert Marsh
bf39674761 C++: remove accidental blank line 2018-08-08 14:17:35 -07:00
Robert Marsh
f280de7ae3 C++: add security tags to more queries 2018-08-08 13:55:36 -07:00
Jonas Jensen
dab45c527e C++: cpp/incomplete-parity-check: medium precision
As reported in CPP-236, this query has false positives on signed
integers that cannot be negative. It could possibly be improved with a
local range analysis, but the query would most likely still have so many
false positives that we would have to lower its precision.

Under our current policy, this change will make the query hidden by
default on LGTM.
2018-08-08 10:14:45 +02:00
Jonas Jensen
a201fe688f Merge pull request #22 from rdmarsh2/rdmarsh/cpp/use-in-own-initializer-macro
C++: handle more macros in UseInOwnInitializer
2018-08-07 20:03:01 +02:00
Nick Rolfe
3444fb7b88 C++: remove all uses of deprecated 'extractor_flags' 2018-08-07 09:48:27 +01:00
Robert Marsh
6546b37d5d C++: handle more macros in UseInOwnInitializer 2018-08-06 11:40:35 -07:00
Jonas Jensen
73a40f6ffc C++: Create cpp/ql/test/{.project,.qlpath}
These are adapted from `javascript/ql/test`.
2018-08-06 14:07:22 +02:00
Pavel Avgustinov
b55526aa58 QL code and tests for C#/C++/JavaScript. 2018-08-02 17:53:23 +01:00