C++: Fix function return type printing.

We used to print T * foo(), but our style suggests T *foo().

Change-Id: Ie3b0ce6b620785ec98aeb394f7955ce959440619
Reviewed-on: http://codereview.qt-project.org/4634
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-12 08:41:53 +02:00
parent 903c6b60cd
commit 151475a0fe
2 changed files with 16 additions and 1 deletions

View File

@@ -194,6 +194,14 @@ void tst_TypePrettyPrinter::basic_data()
// simple functions
addRow(ptr(fnTy("foo", voidTy(), intTy())), "void (*foo)(int)", "foo");
addRow(ptr(fnTy("foo", voidTy(), ptr(voidTy()))), "void (*foo)(void *)", "foo");
addRow(fnTy("foo", voidTy(), intTy()), "void foo(int)", "foo");
addRow(fnTy("foo", voidTy(), ptr(voidTy())), "void foo(void *)", "foo");
// functions with ptr or ref returns
addRow(ptr(fnTy("foo", ptr(voidTy()), intTy())), "void *(*foo)(int)", "foo");
addRow(ptr(fnTy("foo", ref(voidTy()), ptr(voidTy()))), "void &(*foo)(void *)", "foo");
addRow(fnTy("foo", ptr(voidTy()), intTy()), "void *foo(int)", "foo");
addRow(fnTy("foo", ref(voidTy()), ptr(voidTy())), "void &foo(void *)", "foo");
}
void tst_TypePrettyPrinter::basic()