Jonas Jensen
4d2e4c53f1
C++: Suppress IntMultToLong alert on char
2018-09-24 14:37:09 +02:00
Jonas Jensen
2b5d150829
C++: Test for IntMultToLong on char-typed numbers
2018-09-24 14:36:36 +02:00
Dave Bartolomeo
1f36f5552f
Normalize all text files to LF
...
Use `* text=auto eol=lf`
2018-09-23 16:24:31 -07:00
Dave Bartolomeo
aa267c8302
C++: Force LF for .c,.cpp,.h,.hpp
2018-09-23 16:23:52 -07:00
Jonas Jensen
caf4a767ad
Merge pull request #219 from geoffw0/resource-not-released
...
C++: Exclude placement new from AV Rule 79.ql
2018-09-22 17:41:36 +02:00
Raul Garcia
242ee10806
Major change in order to support the rule for C as well as cpp
2018-09-21 16:47:31 -07:00
Raul Garcia
925c3b51f9
Adding semmle-extractor-options: --microsoft to test
2018-09-21 15:21:07 -07:00
Raul Garcia
8519f1a9e1
Fixing tabs replaced to spaces
2018-09-21 13:07:39 -07:00
Geoffrey White
3922082e7d
CPP: Tidy and simplify AV Rule 79.ql.
2018-09-21 19:35:23 +01:00
Raul Garcia
75ef377ac1
Replace Unicode apostrophe with ANSI single quote
2018-09-21 11:34:22 -07:00
Raul Garcia
94f752c59c
Merge branch 'users/raulga/HESULT' of https://github.com/raulgarciamsft/ql into users/raulga/HESULT
2018-09-21 11:14:49 -07:00
Raul Garcia
783be15a45
Fixing typos & ID.
...
NOTE: There is an ongoing discussion on the proper CWE we should use
2018-09-21 11:14:14 -07:00
Geoffrey White
d5a48ad63e
CPP: Additional test cases.
2018-09-21 15:55:29 +01:00
Geoffrey White
84f9900c8c
CPP: Exclude placement new.
2018-09-21 10:53:42 +01:00
Geoffrey White
c7aa5c169b
CPP: Add a test of placement new for AV Rule 79.ql.
2018-09-21 10:47:00 +01:00
Jonas Jensen
e2a17e9740
Merge remote-tracking branch 'upstream/rc/1.18' into mergeback-20180921_104253
2018-09-21 10:45:54 +02:00
Raul Garcia
5ccc1a32aa
Merge branch 'master' into master
2018-09-20 16:30:48 -07:00
Raul Garcia
48c99fb1d1
Setting a SECURITY_DESCRIPTOR’s DACL to NULL
...
Closing the gap between Semmle & PreFAST
This rule is equivalent to C6248
2018-09-20 16:28:37 -07:00
Raul Garcia
64b8a5ba01
Merge branch 'master' into users/raulga/HESULT
2018-09-20 16:20:26 -07:00
Raul Garcia
b0ec929aad
Cast between semantically different integer types: HRESULT to/from a Boolean type.
...
Closing the gap between Semmle and PreFast.
Covers C6214, C6215, C6216, C6217, C6230
2018-09-20 16:16:32 -07:00
Robert Marsh
cc97cf9297
C++: add isReachableFromFunctionEntry
2018-09-20 10:06:19 -07:00
Robert Marsh
755e21d355
C++: improve conversion handling in IRGuards.qll
2018-09-20 10:06:18 -07:00
Robert Marsh
ad8f30d2f7
C++: accept test output and add IR guards tests
2018-09-20 10:06:17 -07:00
Robert Marsh
d7e630b3c6
C++: Add IR-based port of Guards library
...
For ease of reviewing, I've checked in the .expected files from the
AST-based guards library. The next commit accepts output for these tests
and adds tests that use getAST rather than the translation layer.
2018-09-20 10:06:16 -07:00
Robert Marsh
69962bd06c
Merge pull request #203 from dave-bartolomeo/dave/GVN
...
C++: Initial attempt at IR-based value numbering
2018-09-20 10:00:45 -07:00
Dave Bartolomeo
5a25602c28
C++: Move GVN out of "internal" directory
2018-09-20 08:21:15 -07:00
Dave Bartolomeo
27cee9bd80
C++: Handle inheritance conversions in IR GVN
2018-09-20 08:00:38 -07:00
Nick Rolfe
f1358b7c02
C++: test for Class::isStandardLayout()
2018-09-19 10:26:11 +01:00
Dave Bartolomeo
43f0289f0f
C++: Remove Phi instructions from previous IR generations
...
It turns out that when building aliased SSA IR, we were still keeping around the Phi instructions from unaliased SSA IR. These leftover instructions didn't show up in dumps because they were not assigned to a block. However, when dumping additional instruction properties, they would show up as a top-level node in the dump, without a label.
2018-09-18 11:28:09 -07:00
Jonas Jensen
86fe0ce42e
Merge pull request #107 from rdmarsh2/rdmarsh/cpp/HashCons
...
C++: HashCons library
2018-09-18 11:45:26 +02:00
Dave Bartolomeo
46b2c19c66
C++: Initial attempt at IR-based value numbering
2018-09-17 17:19:05 -07:00
Jonas Jensen
a7d897108a
C++: Exclude non-toplevel items from resolveClass
...
Also exclude templates as their names are not canonical.
The test changes in `isfromtemplateinstantiation/` are the inverses of
what we got in 34c9892f7 , which should be a good thing.
2018-09-17 15:55:34 +02:00
Jonas Jensen
d7f442b042
C++: Force unique resolveClass results
2018-09-17 15:52:38 +02:00
Jonas Jensen
b633ee1bc4
C++: Add more tests of resolveClass
...
These tests exercise the problematic cases where a variable can appear
to have multiple types because of how we fail to account for qualified
names when comparing type names.
2018-09-17 15:48:02 +02:00
Jonas Jensen
9886e4a056
Merge remote-tracking branch 'upstream/master' into merge-master-next-20180913
2018-09-13 20:28:17 +02:00
Nick Rolfe
0957ee7c1b
C++: support clang's __builtin_convertvector
2018-09-13 10:28:41 +01:00
Jonas Jensen
df948ecbbc
C++: IR: designated initializer test
2018-09-11 19:43:02 +02:00
Robert Marsh
cb9f1269f9
C++: select example exprs for HashCons portably
...
This makes two changes to how example exprs are selected. Example exprs
are now ordered separately by each piece of the location, rather than by
stringifying their location. Second, UnknownLocations are now ordered
after locations with absolute paths, by using "~" in the lexicographic
comparison of absolute paths. I think this works on both POSIX and
Windows systems, but it's possible I'm missing a way to start an
absolute path with a unicode character.
2018-09-10 12:22:45 -07:00
Robert Marsh
166dba288b
C++: accept test output
2018-09-10 12:22:45 -07:00
Robert Marsh
c42ecfe8f9
C++: Simplify HashCons for new and handle extents
2018-09-10 12:22:44 -07:00
Robert Marsh
06a3e8fc76
C++: Hashcons for ?:, ExprCall, and weird stuff
2018-09-10 12:22:44 -07:00
Robert Marsh
cfeed30a89
C++: Hashcons tests for ArrayExpr
2018-09-10 12:22:44 -07:00
Robert Marsh
8189798f43
C++: HashCons for throw
2018-09-10 12:22:43 -07:00
Robert Marsh
85cfb0202f
C++: add HashCons for delete expressions
2018-09-10 12:22:43 -07:00
Robert Marsh
752f39b537
C++: initial support for aggregate initializers
2018-09-10 12:22:43 -07:00
Robert Marsh
8f446aa9cc
C++: fix handling of aligned allocators
2018-09-10 12:22:43 -07:00
Robert Marsh
5549b6fcab
C++: HashCons for new, new[], sizeof, alignof
2018-09-10 12:22:43 -07:00
Robert Marsh
fede8d63d4
C++: respond to PR comments
2018-09-10 12:22:43 -07:00
Robert Marsh
e6314c5f35
C++: add support for enums in HashCons
2018-09-10 12:22:43 -07:00
Robert Marsh
91da02bacf
C++: uniqueness fixes for HashCons
2018-09-10 12:22:42 -07:00