Fix 11090: Infinite recursion in findTypeInBase() (#4120)
This commit is contained in:
parent
31560299f8
commit
a62fb986a5
|
@ -1884,6 +1884,8 @@ namespace {
|
|||
}
|
||||
|
||||
bool findTypeInBase(const std::string &scope) const {
|
||||
if (scope.empty())
|
||||
return false;
|
||||
// check in base types first
|
||||
if (baseTypes.find(scope) != baseTypes.end())
|
||||
return true;
|
||||
|
|
|
@ -6901,6 +6901,14 @@ private:
|
|||
" ~a();\n"
|
||||
"};\n"
|
||||
"void d() { a::b<int>(); }\n"));
|
||||
|
||||
// #11090
|
||||
ASSERT_NO_THROW(tokenizeAndStringify("using a = char;\n"
|
||||
"using c = int;\n"
|
||||
"template <typename = void> struct d {};\n"
|
||||
"using b = c;\n"
|
||||
"template <> struct d<b> : d<a> {};\n"
|
||||
"template <> struct d<> : d<a> {};\n"));
|
||||
}
|
||||
|
||||
void checkNamespaces() {
|
||||
|
|
Loading…
Reference in New Issue