This commit is contained in:
parent
d5d7446433
commit
0e57c27dd3
|
@ -521,7 +521,7 @@ unsigned int TemplateSimplifier::templateParameters(const Token *tok)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// inner template
|
// inner template
|
||||||
if (tok->str() == "<") {
|
if (tok->str() == "<" && tok->previous()->isName()) {
|
||||||
++level;
|
++level;
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5300,6 +5300,7 @@ private:
|
||||||
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args&...>> constexpr void f() {}")); // #11351
|
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args&...>> constexpr void f() {}")); // #11351
|
||||||
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args&&...>> void f() {}"));
|
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args&&...>> void f() {}"));
|
||||||
ASSERT_EQUALS(3U, templateParameters("template <class T, class... Args, class Tup = std::tuple<Args*...>> void f() {}"));
|
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;"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to unit test TemplateSimplifier::getTemplateNamePosition
|
// Helper function to unit test TemplateSimplifier::getTemplateNamePosition
|
||||||
|
|
Loading…
Reference in New Issue