Jonas Jensen
0652d2a92b
Merge pull request #1705 from geoffw0/qldoceg2
...
CPP: Add syntax examples to QLDoc in Enum.qll.
2019-08-12 13:39:05 +02:00
Geoffrey White
dc1ec635fb
CPP: Undo an accidentally committed change to the test.
2019-08-12 11:17:02 +01:00
Jonas Jensen
5724fb0df0
Merge pull request #1706 from geoffw0/qldoceg3
...
CPP: Add syntax examples to QLDoc in Struct.qll, Union.qll.
2019-08-12 07:57:40 +02:00
Jonas Jensen
b348803a66
Merge pull request #1594 from geoffw0/erafix7
...
CPP: Add test coverage for LeapYearFieldAccess.isModifiedByArithmeticOperation.
2019-08-09 15:57:35 +02:00
Geoffrey White
67eb37f460
CPP: Update test annotations.
2019-08-09 09:31:47 +01:00
Jonas Jensen
605b56f8ca
Merge pull request #1563 from geoffw0/constexprif
...
CPP: Test cases for EmptyBlock.ql with 'if constexpr'
2019-08-08 20:57:28 +02:00
Geoffrey White
950bc6e3d0
CPP: Brace placement.
2019-08-08 17:51:27 +01:00
Jonas Jensen
077f372f98
Merge pull request #1570 from geoffw0/qldoceg
...
CPP: Add syntax examples to QLDoc in Class.qll.
2019-08-06 21:17:45 +02:00
Geoffrey White
bbe7691a3d
CPP: Fix indentation.
2019-08-06 17:56:24 +01:00
Geoffrey White
42bf1be0fd
CPP: 'if constexpr' test cases.
2019-08-06 17:56:24 +01:00
Geoffrey White
6a5ac08578
CPP: Add c++17 flag to the test.
2019-08-06 17:56:24 +01:00
Geoffrey White
3550fc7137
CPP: Merge the two unions tests.
2019-08-06 16:05:10 +01:00
Geoffrey White
4ed559ee0b
CPP: Extend the unions test.
2019-08-06 16:00:35 +01:00
Geoffrey White
cf20647765
CPP: Extend the structs test.
2019-08-06 15:52:25 +01:00
Geoffrey White
2466299df5
CPP: Improve the Enums3 test.
2019-08-06 15:38:10 +01:00
Geoffrey White
064b8773a4
CPP: Test LocalEnum and NestedEnum.
2019-08-06 15:38:10 +01:00
Nick Rolfe
257daddf3b
Merge pull request #1702 from mgrettondann/cpp-add-thread_local-support-external
...
C++: add thread_local support
2019-08-06 14:51:27 +01:00
Geoffrey White
0029a33ee6
CPP: Deprecate Interface and remove the test.
2019-08-06 13:29:42 +01:00
Matthew Gretton-Dann
0e50a143af
C++: Improve ReturnStackAllocatedMemory query
...
Update the ReturnStackAllocatedMmeory query to not give a false positive
for thread_local variables.
2019-08-06 11:22:32 +01:00
Matthew Gretton-Dann
a733625646
C++: Add Variable.isThreadLocal()
2019-08-06 11:22:26 +01:00
Dave Bartolomeo
6370391dbd
C++: Add sanity test for definitions that don't dominate their uses.
2019-08-01 15:01:42 -07:00
Dave Bartolomeo
912679ef8c
C++: Two IR fixes
...
My original fix in https://github.com/Semmle/ql/pull/1661 fixed my minimal test case, but did not fix the original failure in a Linux snapshot. The real fix is to simply not create a `TranslatedDeclarationEntry` for an extern declaration, and have `TranslatedDeclStmt` skip any such declarations. I've added a regression test for that case (multiple extern declarations with same location in a macro expansion, with control flow between them). I did verify that it generates correct IR, and that it fixes all of the "use not dominated by definition" failures in Linux.
The underlying extractor bug, that caused the above issue also caused PrintAST to print garbage. I've worked around the bug in PrintAST.qll.
I've also fixed a bug in the control flow for `try`/`catch`, where there was missing flow from the `CatchByType` of the last handler of a `try` to the enclosing handler (or `Unwind`). Hat tip to @AndreiDiaconu1 for spotting this bug.
2019-08-01 14:38:19 -07:00
zlaski-semmle
2bc66ae553
Merge pull request #1661 from dave-bartolomeo/dave/ExternDeclarations
...
C++: Stop generating `NoOp` instructions for declarations of externs
2019-07-31 19:09:06 -07:00
Dave Bartolomeo
972f0d97d3
C++: Stop generating NoOp instructions for declarations of externs
...
Previously, where we had a function-scoped `DeclarationEntry` for an extern variable or function, we would generate a `NoOp` instruction for it. There's nothing wrong with this by itself, although it was unnecessary. However, I've hit an extractor issue (Jira ticket already opened) that commonly causes multiple `DeclStmt`s to share a single `DeclarationEntry` child on extern declarations, so removing the `NoOp` instructions is an easy way to work around the extractor issue.
2019-07-30 16:49:24 -07:00
Ian Lynagh
8d8a2201b7
C++: Accept changes to getValueText
2019-07-30 23:24:52 +01:00
semmle-qlci
07fa55f331
Merge pull request #1647 from zlaski-semmle/zlaski/builtin-types-compatible-p
...
Approved by dave-bartolomeo
2019-07-30 20:43:39 +01:00
Ian Lynagh
6cce7ef2b7
C++: Add CFG test for constexpr_if
2019-07-30 14:07:35 +01:00
Ian Lynagh
7c763cc3bd
C++: Add a test for constexpr if
2019-07-30 14:07:35 +01:00
Ziemowit Laski
889408be8f
Add test case.
2019-07-29 17:17:42 -07:00
Ian Lynagh
cff1bb0b96
C++: Update lambda test output
...
Indexes are now 0-based.
2019-07-26 20:39:22 +01:00
Robert Marsh
05cad96086
Merge pull request #1605 from geoffw0/bitwiseneg
...
CPP: Make BitwiseSignCheck.ql more accurate
2019-07-24 12:33:40 -07:00
Robert Marsh
fa43ae241d
Merge pull request #1615 from geoffw0/exprowninit
...
CPP: Test + workaround for UseInOwnInitializer.ql
2019-07-24 12:13:24 -07:00
Geoffrey White
75f77b5f47
Merge pull request #1532 from zlaski-semmle/zlaski/cpp386
...
[CPP-386] Add `getCanonicalQLClass()` for AST QL elements.
2019-07-24 09:38:39 +01:00
Ziemowit Laski
e989eabc0a
Update test case (remove references to MacroInvocationStmt and MacroInvocationExpr)
2019-07-22 11:09:30 -07:00
Geoffrey White
d39d9bf1f0
CPP: Workaround FPs.
2019-07-22 11:48:25 +01:00
Geoffrey White
185ca590f2
CPP: Test exposing UseInOwnInitializer FPs.
2019-07-22 11:34:01 +01:00
Ziemowit Laski
a0570213d7
[CPP-386] Separate printing of casts and conversion, per Dave's request.
2019-07-19 16:56:22 -07:00
Ziemowit Laski
45d944411f
[CPP-386] Fix Local{Class,Struct,Union}, macro invocations,
...
printing of member functions and operators.
2019-07-18 16:09:04 -07:00
Ziemowit Laski
926742561b
[CPP-340] Eliminate superfluous print-outs of NestedStruct,
...
`NestedUnion` and `MemberFunction`
2019-07-17 13:39:43 -07:00
Geoffrey White
48a60651b6
CPP: Fix query.
2019-07-17 11:43:05 +01:00
Geoffrey White
aa368d8763
CPP: Add test cases.
2019-07-17 11:38:59 +01:00
Ziemowit Laski
f0982791e3
[CPP-340] Remove colons and extraenous QLDoc comments; add a few more classes.
2019-07-16 17:58:39 -07:00
zlaski-semmle
6764390970
Merge pull request #1586 from geoffw0/norm-taint-test
...
CPP: Normalize the taint tests
2019-07-16 11:49:42 -07:00
Geoffrey White
1b7d1c37ec
CPP: Test showing that Adding365daysPerYear.ql doesn't actually care whether the return value of the time conversion function is checked.
2019-07-16 17:29:30 +01:00
Geoffrey White
4df176ae34
CPP: Add test coverage for isModifiedByArithmeticOperation.
2019-07-15 19:42:50 +01:00
Geoffrey White
cf194219b9
CPP: Fix FPs.
2019-07-15 14:58:35 +01:00
Geoffrey White
5362fef81c
CPP: Additional AllocaInLoop test cases.
2019-07-15 14:50:02 +01:00
Ziemowit Laski
c906560edd
Fix up expected IR output after rebase.
2019-07-13 12:57:25 -07:00
Ziemowit Laski
960a41be85
Handle __builtin_addressof.
2019-07-13 12:23:40 -07:00
Ziemowit Laski
175ba7b3b0
Fix up .expected on the IR side.
2019-07-13 12:23:40 -07:00