diff --git a/clang/lib/3C/DeclRewriter.cpp b/clang/lib/3C/DeclRewriter.cpp index 4bfba2c45038..95b3fe39646e 100644 --- a/clang/lib/3C/DeclRewriter.cpp +++ b/clang/lib/3C/DeclRewriter.cpp @@ -61,9 +61,8 @@ void DeclRewriter::rewriteDecls(ASTContext &Context, ProgramInfo &Info, if (Var.anyChanges(Env)) { std::string newTy = getStorageQualifierString(D) + - Var.mkString(Info.getConstraints().getVariables(), false, - false, false, true) + - " " + TD->getNameAsString(); + Var.mkString(Info.getConstraints().getVariables(), true, + false, false, true); RewriteThese.insert( new TypedefDeclReplacement(TD, nullptr, newTy)); } diff --git a/clang/lib/3C/ProgramInfo.cpp b/clang/lib/3C/ProgramInfo.cpp index 28b1a9106f2f..9e68aedb4f22 100644 --- a/clang/lib/3C/ProgramInfo.cpp +++ b/clang/lib/3C/ProgramInfo.cpp @@ -1045,7 +1045,7 @@ bool ProgramInfo::seenTypedef(PersistentSourceLoc PSL) { void ProgramInfo::addTypedef(PersistentSourceLoc PSL, bool CanRewriteDef, TypedefDecl* TD, ASTContext &C) { - auto Name = "typedef__" + TD->getNameAsString(); + auto Name = TD->getNameAsString(); auto* PV = new PointerVariableConstraint(TD->getUnderlyingType(), nullptr, Name, *this, C); auto *const Rsn =