Skip to content

Commit 710ac7c

Browse files
author
Aaron Eline
committed
Fixed part 1 of #373
1 parent 198fcca commit 710ac7c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

clang/lib/3C/ConstraintVariables.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,8 @@ void PointerVariableConstraint::setTypedef(TypedefNameDecl* T, std::string s) {
627627
std::string PointerVariableConstraint::mkString(const EnvironmentMap &E,
628628
bool EmitName, bool ForItype,
629629
bool EmitPointee, bool UnmaskTypedef) const {
630-
if (IsTypedef && !UnmaskTypedef) {
630+
if (IsTypedef && !UnmaskTypedef)
631631
return typedefString + (EmitName && getName() != RETVAR ? (" " + getName()) : " ");
632-
}
633632

634633
std::ostringstream Ss;
635634
// This deque will store all the type strings that need to pushed
@@ -780,15 +779,18 @@ std::string PointerVariableConstraint::mkString(const EnvironmentMap &E,
780779
EndStrs.push_front(" " + getName());
781780
}
782781

783-
if (EmittedBase == false) {
782+
if (!EmittedBase) {
784783
// If we have a FV pointer, then our "base" type is a function pointer.
785784
// type.
786785
if (FV) {
787786
Ss << FV->mkString(E);
788787
} else if (typedeflevelinfo.hasTypedef) {
789-
auto name = typedeflevelinfo.typedefName;
790-
Ss << name;
788+
auto Name = typedeflevelinfo.typedefName;
789+
Ss << Name;
791790
} else {
791+
std::ostringstream Stream;
792+
auto Idx = typedeflevelinfo.typedefLevel;
793+
getQualString(Idx, Stream);
792794
Ss << BaseType;
793795
}
794796
}

0 commit comments

Comments
 (0)