Currently tabs are poorly handled by just replacing X spaces with a tab. Note that this even breaks the AlignTrailingComments+UseTab combination. I use tabs for indentation and spaces for any remaining alignment. That way everyone can use their preferred tab width setting and everything is still perfectly aligned and displayed consistently. <tab>if (... && // bla <tab> ...) // bla or <tab>callFoo(param1, <tab> param2)
Note that w agree that "replace 8 spaces with tabs" is insane, but unfortunately it's Linus Torvald's insanity, so we'll need to keep the current behavior, and implement the proposed behavior as an option.
(In reply to comment #0) > Note that this even breaks the AlignTrailingComments+UseTab combination. This particular issue should be fixed in r191497. We're thinking about implementing the rest of your proposal under a separate style option, because the current behavior is also sometimes desired (e.g. it's what Linux Kernel uses).
As of r191529, clang-format understands UseTab: ForIndentation, which should do what you need. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html for the description.