This commit is contained in:
parent
8148095fe5
commit
7881b99547
|
@ -891,6 +891,8 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
|
|||
for (Scope& scope : scopeList) {
|
||||
if (!scope.isClassOrStructOrUnion())
|
||||
continue;
|
||||
if (scope.classDef && Token::simpleMatch(scope.classDef->previous(), ">")) // skip uninstantiated template
|
||||
continue;
|
||||
|
||||
if (!scope.definedType) {
|
||||
mBlankTypes.emplace_back();
|
||||
|
|
|
@ -267,6 +267,7 @@ private:
|
|||
TEST_CASE(namespaces2);
|
||||
TEST_CASE(namespaces3); // #3854 - unknown macro
|
||||
TEST_CASE(namespaces4);
|
||||
TEST_CASE(needInitialization);
|
||||
|
||||
TEST_CASE(tryCatch1);
|
||||
|
||||
|
@ -2790,6 +2791,20 @@ private:
|
|||
ASSERT_EQUALS(2U, fredAType->classDef->linenr());
|
||||
}
|
||||
|
||||
void needInitialization() { // #10259
|
||||
const auto oldSettings = settings1;
|
||||
settings1.debugwarnings = true;
|
||||
|
||||
GET_SYMBOL_DB("template <typename T>\n"
|
||||
"struct A {\n"
|
||||
" using type = T;\n"
|
||||
" type t_;\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
settings1 = oldSettings;
|
||||
}
|
||||
|
||||
void tryCatch1() {
|
||||
const char str[] = "void foo() {\n"
|
||||
" try { }\n"
|
||||
|
|
Loading…
Reference in New Issue