[cfe-dev] clang-format and namespaces

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sun Jan 26 19:36:31 PST 2014


On 26 January 2014 22:27, Alp Toker <alp at nuanti.com> wrote:
> Hi Daniel,
>
> clang-format-diff is clobbering the existing indentation of namespaces in
> the LLVM codebase:
>
> --- a/include/llvm/Support/ErrorHandling.h
> +++ b/include/llvm/Support/ErrorHandling.h
> @@ -19,7 +19,7 @@
>  #include <string>
>
>  namespace llvm {
> -  class StringRef;
> +class StringRef;
>    class Twine;
>
> CCing the list as it's easy to miss before committing for anyone else using
> the tool, so heads up on that.
>
> (Switching back to a clang-format snapshot from a couple of months ago has
> worked out fine to format the large-scale refactoring changes landed to ToT
> last week.)

There was an intentional change to the llvm guidelines to not indent
inside namespaces. I guess one issue with clang-format is that it is a
bit too eager to move to the new style :-)

Cheers,
Rafael



More information about the cfe-dev mailing list