parent
48a7a43ef2
commit
e4f92f6979
|
@ -499,7 +499,7 @@ unsigned int TemplateSimplifier::templateParameters(const Token *tok)
|
|||
return 0;
|
||||
|
||||
// num/type ..
|
||||
if (!tok->isNumber() && tok->tokType() != Token::eChar && !tok->isName() && !tok->isOp())
|
||||
if (!tok->isNumber() && tok->tokType() != Token::eChar && tok->tokType() != Token::eString && !tok->isName() && !tok->isOp())
|
||||
return 0;
|
||||
tok = tok->next();
|
||||
if (!tok)
|
||||
|
|
|
@ -5319,6 +5319,7 @@ private:
|
|||
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args*...>> void f() {}"));
|
||||
ASSERT_EQUALS(1U, templateParameters("S<4 < sizeof(uintptr_t)> x;"));
|
||||
ASSERT_EQUALS(2U, templateParameters("template <typename... Ts, typename = std::enable_if_t<std::is_same<Ts..., int>::value>> void g() {}")); // #11915
|
||||
ASSERT_EQUALS(1U, templateParameters("S<N::M<O<\"A\"_I>>> s;")); // #10837
|
||||
}
|
||||
|
||||
// Helper function to unit test TemplateSimplifier::getTemplateNamePosition
|
||||
|
|
Loading…
Reference in New Issue