diff --git a/src/dfmt.d b/src/dfmt.d index 5bdb674..37dbe5e 100644 --- a/src/dfmt.d +++ b/src/dfmt.d @@ -290,7 +290,7 @@ private: write(" "); writeParens(true); } - else if (isBlockHeader()) + else if (isBlockHeader() && peekIs(tok!"(", false)) { if (current.type == tok!"if") ifIndents.push(tempIndent); diff --git a/tests/issue0073.d b/tests/issue0073.d new file mode 100644 index 0000000..5a474c0 --- /dev/null +++ b/tests/issue0073.d @@ -0,0 +1,6 @@ +void presumed (out uint column) @trusted { + CXString cxstring; + + clang_getPresumedLocation(cx, &cxstring, &line, &column); + filename = toD(cxstring); + } diff --git a/tests/issue0073.d.ref b/tests/issue0073.d.ref new file mode 100644 index 0000000..6119049 --- /dev/null +++ b/tests/issue0073.d.ref @@ -0,0 +1,7 @@ +void presumed(out uint column) @trusted +{ + CXString cxstring; + + clang_getPresumedLocation(cx, &cxstring, &line, &column); + filename = toD(cxstring); +}