diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 1cfd6e6a6..94bca1f99 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -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; diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 141251a42..56ed5fe63 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -6901,6 +6901,14 @@ private: " ~a();\n" "};\n" "void d() { a::b(); }\n")); + + // #11090 + ASSERT_NO_THROW(tokenizeAndStringify("using a = char;\n" + "using c = int;\n" + "template struct d {};\n" + "using b = c;\n" + "template <> struct d : d {};\n" + "template <> struct d<> : d {};\n")); } void checkNamespaces() {