parent
dc19916966
commit
57bbb17f3b
|
@ -1666,7 +1666,7 @@ void Tokenizer::simplifyTypedefCpp()
|
||||||
|
|
||||||
pattern += typeName->str();
|
pattern += typeName->str();
|
||||||
} else {
|
} else {
|
||||||
if (scope == 0)
|
if (scope == 0 && !(classLevel > 1 && tok2 == spaceInfo[classLevel - 1].bodyEnd))
|
||||||
break;
|
break;
|
||||||
--scope;
|
--scope;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3377,6 +3377,16 @@ private:
|
||||||
"}\n"
|
"}\n"
|
||||||
"N::C::C(T*) : p(nullptr) {}\n";
|
"N::C::C(T*) : p(nullptr) {}\n";
|
||||||
ASSERT_EQUALS("namespace N { struct C { C ( int * ) ; void * p ; } ; } N :: C :: C ( int * ) : p ( nullptr ) { }", tok(code));
|
ASSERT_EQUALS("namespace N { struct C { C ( int * ) ; void * p ; } ; } N :: C :: C ( int * ) : p ( nullptr ) { }", tok(code));
|
||||||
|
|
||||||
|
code = "namespace N {\n" // #11986
|
||||||
|
" typedef char U;\n"
|
||||||
|
" typedef int V;\n"
|
||||||
|
" struct S {};\n"
|
||||||
|
" struct T { void f(V*); };\n"
|
||||||
|
"}\n"
|
||||||
|
"void N::T::f(V*) {}\n"
|
||||||
|
"namespace N {}\n";
|
||||||
|
ASSERT_EQUALS("namespace N { struct S { } ; struct T { void f ( int * ) ; } ; } void N :: T :: f ( int * ) { }", tok(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
void simplifyTypedefFunction1() {
|
void simplifyTypedefFunction1() {
|
||||||
|
|
Loading…
Reference in New Issue