Sorry this was not supposed to be committed.

Revert "Revert "Try to fix the type rewriter.""

This reverts commit c9bc1e7c64.
This commit is contained in:
Roberto Raggi
2010-07-20 15:04:50 +02:00
parent 3b48da9391
commit f895cbb472
4 changed files with 122 additions and 61 deletions

View File

@@ -37,6 +37,7 @@
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
#include <cplusplus/DependencyTable.h>
#include <cplusplus/CppRewriter.h>
#include <TranslationUnit.h>
#include <ASTVisitor.h>
@@ -1546,8 +1547,18 @@ public:
TypeOfExpression::Preprocess);
if (! result.isEmpty()) {
SubstitutionEnvironment env;
env.setContext(context());
env.switchScope(result.first().scope());
UseQualifiedNames q;
env.enter(&q);
Control *control = context().control().data();
FullySpecifiedType tn = rewriteType(result.first().type(), &env, control);
Overview oo;
QString ty = oo(result.first().type());
QString ty = oo(tn);
if (! ty.isEmpty()) {
const QChar ch = ty.at(ty.size() - 1);