From ffbc28cbbd544e4c22f542322a9ea10a7660b8fc Mon Sep 17 00:00:00 2001
From: Roberto Raggi <qtc-committer@nokia.com>
Date: Wed, 7 Jan 2009 10:38:24 +0100
Subject: [PATCH] Added a space before cv-qualifiers in a function declarator.

---
 shared/cplusplus/PrettyPrinter.cpp  | 3 +--
 tests/manual/cplusplus/tests/t1.cpp | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp
index 891a63020cd..d7570127e32 100644
--- a/shared/cplusplus/PrettyPrinter.cpp
+++ b/shared/cplusplus/PrettyPrinter.cpp
@@ -566,9 +566,8 @@ bool PrettyPrinter::visit(FunctionDeclaratorAST *ast)
     accept(ast->parameters);
     out << ')';
     for (SpecifierAST *it = ast->cv_qualifier_seq; it; it = it->next) {
+        out << ' ';
         accept(it);
-        if (it->next)
-            out << ' ';
     }
     if (ast->exception_specification) {
         out << ' ';
diff --git a/tests/manual/cplusplus/tests/t1.cpp b/tests/manual/cplusplus/tests/t1.cpp
index 8687efb48f4..186d9fbea7c 100644
--- a/tests/manual/cplusplus/tests/t1.cpp
+++ b/tests/manual/cplusplus/tests/t1.cpp
@@ -23,6 +23,8 @@ class Class {
 };
 
 class Derived: public Class {
+  operator bool() const volatile throw () { return 1; }
+  Derived &operator++() {}
 };
 
 class Derived2: public Class, public virtual Derived {};
-- 
GitLab