From 9ff5676e72365faa6394a3874a5ec31124829a11 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Tue, 27 Oct 2009 14:59:10 +0100
Subject: [PATCH] Introduced FullySpecifiedType::copySpecifiers()

---
 src/shared/cplusplus/FullySpecifiedType.cpp | 19 +++++++++++++++++++
 src/shared/cplusplus/FullySpecifiedType.h   |  2 ++
 2 files changed, 21 insertions(+)

diff --git a/src/shared/cplusplus/FullySpecifiedType.cpp b/src/shared/cplusplus/FullySpecifiedType.cpp
index 578c6c9b7d6..a9063fda67f 100644
--- a/src/shared/cplusplus/FullySpecifiedType.cpp
+++ b/src/shared/cplusplus/FullySpecifiedType.cpp
@@ -80,6 +80,10 @@ FullySpecifiedType FullySpecifiedType::qualifiedType() const
     ty.setExtern(false);
     ty.setMutable(false);
     ty.setTypedef(false);
+
+    ty.setInline(false);
+    ty.setVirtual(false);
+    ty.setExplicit(false);
     return ty;
 }
 
@@ -209,4 +213,19 @@ FullySpecifiedType FullySpecifiedType::simplified() const
     return *this;
 }
 
+void FullySpecifiedType::copySpecifiers(const FullySpecifiedType &type)
+{
+    // class storage specifiers
+    f._isFriend = type.f._isFriend;
+    f._isRegister = type.f._isRegister;
+    f._isStatic = type.f._isStatic;
+    f._isExtern = type.f._isExtern;
+    f._isMutable = type.f._isMutable;
+    f._isTypedef = type.f._isTypedef;
+
+    // function specifiers
+    f._isInline = type.f._isInline;
+    f._isVirtual = type.f._isVirtual;
+    f._isExplicit = type.f._isExplicit;
+}
 
diff --git a/src/shared/cplusplus/FullySpecifiedType.h b/src/shared/cplusplus/FullySpecifiedType.h
index 6c9f83d9145..5aea04dca18 100644
--- a/src/shared/cplusplus/FullySpecifiedType.h
+++ b/src/shared/cplusplus/FullySpecifiedType.h
@@ -121,6 +121,8 @@ public:
 
     FullySpecifiedType simplified() const;
 
+    void copySpecifiers(const FullySpecifiedType &type);
+
 private:
     Type *_type;
     struct Flags {
-- 
GitLab