fix #2943 (Symbol database: Wrong parsing of std::vector as base class.)
This commit is contained in:
parent
2b48c7624c
commit
54141f2e7f
|
@ -1257,6 +1257,9 @@ const Token *SymbolDatabase::initBaseInfo(Scope *scope, const Token *tok)
|
|||
// add unhandled templates
|
||||
if (tok2->next()->str() == "<")
|
||||
{
|
||||
tok2 = tok2->next();
|
||||
base.name += tok2->str();
|
||||
|
||||
int level1 = 1;
|
||||
while (tok2->next())
|
||||
{
|
||||
|
|
|
@ -175,6 +175,7 @@ private:
|
|||
TEST_CASE(const47); // ticket #2670
|
||||
TEST_CASE(const48); // ticket #2672
|
||||
TEST_CASE(const49); // ticket #2795
|
||||
TEST_CASE(const50); // ticket #2943
|
||||
TEST_CASE(assigningPointerToPointerIsNotAConstOperation);
|
||||
TEST_CASE(assigningArrayElementIsNotAConstOperation);
|
||||
TEST_CASE(constoperator1); // operator< can often be const
|
||||
|
@ -5551,6 +5552,23 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const50() // ticket 2943
|
||||
{
|
||||
checkConst("class Altren\n"
|
||||
"{\n"
|
||||
" class SubClass : public std::vector<int>\n"
|
||||
" {\n"
|
||||
" };\n"
|
||||
"};\n"
|
||||
"void _setAlign()\n"
|
||||
"{\n"
|
||||
" if (mTileSize.height > 0) return;\n"
|
||||
" if (mEmptyView) return;\n"
|
||||
"}\n");
|
||||
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void assigningPointerToPointerIsNotAConstOperation()
|
||||
{
|
||||
checkConst("struct s\n"
|
||||
|
|
Loading…
Reference in New Issue