Commit a61f21d
Accept nested templates in tokenizer-simplify (cppcheck-opensource#1070)
The following snippet triggerd the error:
template<typename DerivedT>
template<typename T>
auto ComposableParserImpl<DerivedT>::operator|( T const &other ) const -> Parser {
return Parser() | static_cast<DerivedT const &>( *this ) | other;
}
Whenever simplifyFunctionParameters was called on a templated class'
templated member function (and probably any nested template), the
tokenizer would recognise it as a syntax error, assuming that return
type *must* come after a template<> token.1 parent d47b772 commit a61f21d
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8420 | 8420 | | |
8421 | 8421 | | |
8422 | 8422 | | |
8423 | | - | |
| 8423 | + | |
8424 | 8424 | | |
8425 | 8425 | | |
8426 | 8426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
3116 | 3117 | | |
3117 | 3118 | | |
3118 | 3119 | | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
3119 | 3126 | | |
3120 | 3127 | | |
3121 | 3128 | | |
| |||
0 commit comments