From ba244be2d6e9a7f8227f59092b5558925d4f8f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 11 Jan 2020 16:49:30 +0100 Subject: [PATCH] Clang import; getType() --- lib/clangimport.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/clangimport.cpp b/lib/clangimport.cpp index 28e422e2f..6ee36ae9d 100644 --- a/lib/clangimport.cpp +++ b/lib/clangimport.cpp @@ -267,6 +267,16 @@ std::string clangimport::AstNode::getType() const type[pos] = '\''; type.erase(pos+1); } + if (type.find(" *(") != std::string::npos) { + std::string::size_type pos = type.find(" *(") + 2; + type[pos] = '\''; + type.erase(pos+1); + } + if (type.find(" &(") != std::string::npos) { + std::string::size_type pos = type.find(" &(") + 2; + type[pos] = '\''; + type.erase(pos+1); + } return unquote(type); }