jrp2014
b6504c70ca
Improve constness
2018-04-04 21:51:31 +02:00
orbitcowboy
ec0cc4e29c
templatesimplifier: Removed redundant local string variable. ( #1041 )
2018-01-20 22:26:48 +01:00
Daniel Marjamäki
b08c1868bc
Fixed Cppcheck warning
2018-01-15 22:03:23 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
bbeff99cc3
Fixed #6930 (Token: need function that says if the token comes from instantiated template argument)
2018-01-11 09:41:22 +01:00
Daniel Marjamäki
8c33a95b49
Refactoring: moved method from Tokenizer to TokenList
2018-01-07 14:07:34 +01:00
Daniel Marjamäki
98b45ffbc0
Fixed #8314 (TemplateSimplifer crash)
2018-01-06 15:16:03 +01:00
Daniel Marjamäki
943693acfb
TemplateSimplifier: Improved code for template aliases
2018-01-06 08:40:06 +01:00
Martin Ettl
e33fe91b1a
Micro optimize std::string::find() calls searching for a single space.
2018-01-05 22:24:28 +01:00
Daniel Marjamäki
d6dae27803
Fixed Cppcheck postincrement warnings
2018-01-05 17:29:40 +01:00
Daniel Marjamäki
2c5225af43
Fixed use-after-free found by asan
2018-01-05 17:06:02 +01:00
Daniel Marjamäki
04c57381ea
Fixed #8315 (heap use after free: templatesimplifier)
2018-01-05 16:10:13 +01:00
Matthias Krüger
94790620d6
templatesimplifier: fix two warnings about nonexplicit constructors.
...
Was:
[lib/templatesimplifier.cpp:37]: (style) Class 'FindToken' has a constructor with 1 argument that is not explicit.
[lib/templatesimplifier.cpp:47]: (style) Class 'FindName' has a constructor with 1 argument that is not explicit.
2018-01-05 15:53:13 +01:00
Daniel Marjamäki
f74c19bbed
Refactoring lookups in TemplateSimplifier
2018-01-05 15:27:43 +01:00
Daniel Marjamäki
a95108ebe3
TemplateSimplifier: Fix incorrect recursion when template is reused inside itself
2018-01-03 23:05:57 +01:00
Dmitry-Me
70817b3d4e
Remove redundant check
2018-01-01 03:06:17 +03:00
Daniel Marjamäki
1cbeec26c6
Replace Token::Match with Token::simpleMatch
2017-12-30 22:43:44 +01:00
Daniel Marjamäki
f6fcf01cc6
Fixed #7868 (TemplateSimplifier: template specialization fails)
2017-12-30 22:14:48 +01:00
Daniel Marjamäki
03a4c84fec
Rename variables
2017-12-30 12:27:55 +01:00
Daniel Marjamäki
a8f73055ad
Templates: Fixed scope problem
2017-12-30 09:00:19 +01:00
Daniel Marjamäki
fc1ac180e6
Fixed #6218 (Template type aliasing misdetection)
2017-12-29 22:47:07 +01:00
Daniel Marjamäki
caf9f22015
Rename method TemplateParametersInDeclaration => getTemplateParametersInDeclaration
2017-12-28 22:10:10 +01:00
Daniel Marjamäki
42bcb6d417
use early continue
2017-12-27 22:29:45 +01:00
Daniel Marjamäki
469cb7e6df
TemplateSimplifier: Fix instantiations when template parameter is a template
2017-12-26 22:34:39 +01:00
Daniel Marjamäki
84bdabacf8
TemplateSimplifier: Remove not needed variable indentlevel
2017-12-26 13:27:02 +01:00
Daniel Marjamäki
2c69f2b226
TemplateSimplifier: Improved handling of scopes
2017-12-26 10:55:18 +01:00
Daniel Marjamäki
a80760cb6f
TemplateSimplifier: Fix in expandTemplate
2017-12-25 08:19:46 +01:00
Daniel Marjamäki
1eb2df34ad
Revert improved scope handling in TemplateSimplifier
2017-12-23 22:11:30 +01:00
Daniel Marjamäki
d237d36d46
TemplateSimplifier: Fix crash seen in Travis
2017-12-23 17:29:28 +01:00
Daniel Marjamäki
2d7fedbb49
Try to fix Travis
2017-12-23 15:41:32 +01:00
Daniel Marjamäki
5ed2dbd5ef
Fix Cppcheck warning
2017-12-23 10:16:17 +01:00
Daniel Marjamäki
326765c632
TemplateSimplifier: Better handling of scopes
2017-12-23 08:20:24 +01:00
Simon Martin
1b14380007
Ticket #8175 : Fix bug in TemplateSimplifier::instantiateMatch with template parameters involving sizeof or namespace.
2017-12-02 19:18:36 +01:00
Daniel Marjamäki
324257ef52
Fixed #7823 (No varid for member variable of type std::bitset< static_cast<int>(2) >)
2017-11-05 17:59:34 +01:00
Ayaz Salikhov
be2c65eb58
Simplify int vs bool
2017-10-08 07:54:39 +02:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
Daniel Marjamäki
6cc7f46696
Fix issue detected by Coverity, ternary condition is always true
2017-08-01 11:25:28 +02:00
Daniel Marjamäki
b97f5d909e
Fixed #6570 (False positive unusedFunction - function called from within template function)
2017-06-30 14:34:28 +02:00
Daniel Marjamäki
da87fdbb90
Refactoring TemplateSimplifier::simplifyCalculations, Token::Match patterns
2017-06-08 08:18:40 +02:00
Daniel Marjamäki
c1ea873e1c
TemplateSimplifier::simplifyCalculations: Add some more tests and make sure they pass
2017-06-08 08:15:05 +02:00
Daniel Marjamäki
cb48e63f92
TemplateSimplifier: Fixed bug in simplifyCalculations. Now template58 test case does not throw InternalError
2017-06-08 00:49:46 +02:00
Daniel Marjamäki
d2e7df2c04
TemplateSimplifier: Broke out code into separate function
2017-06-08 00:16:43 +02:00
Daniel Marjamäki
2740736136
Avoid 'deleteThis' in TemplateSimplifier::simplifyCalculations as it can cause 'use after free' see #6021
2017-06-07 20:09:06 +02:00
Daniel Marjamäki
d335412858
Avoid 'deleteThis' in TemplateSimplifier::simplifyCalculations as it can cause 'use after free' see #6021
2017-06-07 19:46:02 +02:00
Daniel Marjamäki
18abe4a142
Fixed #6021 (TemplateSimplifier::simplifyCalculations causes heap corruption on invalid code)
2017-06-07 19:32:56 +02:00
Daniel Marjamäki
60e36492e2
Refactoring, renamed local variable
2017-06-07 12:37:44 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Matthias Krüger
a28f57344c
templatesimplifier: mark getTemplateNamePositionTemplateMember() static.
...
Fixes gcc 7-dev warning:
lib/templatesimplifier.cpp: In function ‘bool getTemplateNamePositionTemplateMember(const Token*, int&)’:
lib/templatesimplifier.cpp:715:6: warning: no previous declaration for ‘bool getTemplateNamePositionTemplateMember(const Token*, int&)’ [-Wmissing-declarations]
bool getTemplateNamePositionTemplateMember(const Token *tok, int &namepos)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-05-03 08:45:48 +02:00
Simon Martin
28960a8bba
Remove bailout and fix varid for template class member initialized in out-of-line constructor ( #8031 )
2017-04-30 08:59:47 +02:00
Simon Martin
5fd686c878
Ticket #4544 : Also handle Foo<struct Bar> constructs.
2017-04-17 11:24:28 +02:00