Skip to content

Commit 4e44614

Browse files
committed
Keep indentations consistent in wrapper generation
Commit 9dfb86e moved multiple loops that performed indentations to use the `indent` function. Some nested loops that indented upto the indent level ( with a loop condition of `j <= indent_level`) should have incremented the indent level before passing it to the helper function, but did not, resulting in inconsistent indentations.
1 parent e9da0e1 commit 4e44614

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ namespace Cpp {
19181918
callbuf << ' ';
19191919
} else {
19201920
callbuf << "\n";
1921-
indent(callbuf, indent_level);
1921+
indent(callbuf, indent_level + 1);
19221922
}
19231923
}
19241924
if (refType != kNotReference) {
@@ -1978,7 +1978,7 @@ namespace Cpp {
19781978
callbuf << ' ';
19791979
} else {
19801980
callbuf << "\n";
1981-
indent(callbuf, indent_level);
1981+
indent(callbuf, indent_level + 1);
19821982
}
19831983
}
19841984
const ParmVarDecl* PVD = FD->getParamDecl(i);
@@ -2052,7 +2052,7 @@ namespace Cpp {
20522052
callbuf << ' ';
20532053
} else {
20542054
callbuf << "\n";
2055-
indent(callbuf, indent_level);
2055+
indent(callbuf, indent_level + 1);
20562056
}
20572057
}
20582058

0 commit comments

Comments
 (0)