r218392 - clang-format: Don't let -style=Chromium imply c++03 template formatting.

Daniel Jasper djasper at google.com
Wed Sep 24 23:28:52 PDT 2014


Yay :-)

On Wed, Sep 24, 2014 at 7:17 PM, Nico Weber <nicolasweber at gmx.de> wrote:

> Author: nico
> Date: Wed Sep 24 12:17:32 2014
> New Revision: 218392
>
> URL: http://llvm.org/viewvc/llvm-project?rev=218392&view=rev
> Log:
> clang-format: Don't let -style=Chromium imply c++03 template formatting.
>
> Chromium's now using some c++11 language features, so it's now fine that
> clang-format produces vector<vector<int>>.
>
> Modified:
>     cfe/trunk/lib/Format/Format.cpp
>     cfe/trunk/unittests/Format/FormatTest.cpp
>
> Modified: cfe/trunk/lib/Format/Format.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=218392&r1=218391&r2=218392&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Format/Format.cpp (original)
> +++ cfe/trunk/lib/Format/Format.cpp Wed Sep 24 12:17:32 2014
> @@ -430,7 +430,6 @@ FormatStyle getChromiumStyle(FormatStyle
>    ChromiumStyle.AllowShortLoopsOnASingleLine = false;
>    ChromiumStyle.BinPackParameters = false;
>    ChromiumStyle.DerivePointerAlignment = false;
> -  ChromiumStyle.Standard = FormatStyle::LS_Cpp03;
>    return ChromiumStyle;
>  }
>
>
> Modified: cfe/trunk/unittests/Format/FormatTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=218392&r1=218391&r2=218392&view=diff
>
> ==============================================================================
> --- cfe/trunk/unittests/Format/FormatTest.cpp (original)
> +++ cfe/trunk/unittests/Format/FormatTest.cpp Wed Sep 24 12:17:32 2014
> @@ -4672,6 +4672,8 @@ TEST_F(FormatTest, UnderstandsTemplatePa
>    EXPECT_EQ("A<::A<int>> a;", format("A< ::A<int>> a;",
> getGoogleStyle()));
>    EXPECT_EQ("A<::A<int>> a;", format("A<::A<int> > a;",
> getGoogleStyle()));
>
> +  verifyFormat("A<A>> a;", getChromiumStyle(FormatStyle::LK_Cpp));
> +
>    verifyFormat("test >> a >> b;");
>    verifyFormat("test << a >> b;");
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140925/a3aa5f49/attachment.html>


More information about the cfe-commits mailing list