This commit is contained in:
parent
c033c62190
commit
d75331d00d
|
@ -3158,6 +3158,9 @@ Check::FileInfo *CheckClass::getFileInfo(const Tokenizer *tokenizer, const Setti
|
|||
if (classScope->isAnonymous())
|
||||
continue;
|
||||
|
||||
if (classScope->classDef && Token::simpleMatch(classScope->classDef->previous(), ">"))
|
||||
continue;
|
||||
|
||||
// the full definition must be compared
|
||||
const bool fullDefinition = std::all_of(classScope->functionList.cbegin(),
|
||||
classScope->functionList.cend(),
|
||||
|
|
|
@ -8546,6 +8546,12 @@ private:
|
|||
|
||||
ctu({"class A::C { C() { std::cout << 0; } };", "class B::C { C() { std::cout << 1; } };"});
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// 11435 - template specialisations
|
||||
const std::string header = "template<typename T1, typename T2> struct Test {};\n";
|
||||
ctu({header + "template<typename T1> struct Test<T1, int> {};\n",
|
||||
header + "template<typename T1> struct Test<T1, double> {};\n"});
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue