]> granicus.if.org Git - clang/commitdiff
clang-format: Don't let -style=Chromium imply c++03 template formatting.
authorNico Weber <nicolasweber@gmx.de>
Wed, 24 Sep 2014 17:17:32 +0000 (17:17 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 24 Sep 2014 17:17:32 +0000 (17:17 +0000)
Chromium's now using some c++11 language features, so it's now fine that
clang-format produces vector<vector<int>>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218392 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/Format.cpp
unittests/Format/FormatTest.cpp

index 2948ec48cde9ff12ea70b239f1d8028e37095d84..e70bad9f3be2870002fbd2baa74698e819034d35 100644 (file)
@@ -430,7 +430,6 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) {
   ChromiumStyle.AllowShortLoopsOnASingleLine = false;
   ChromiumStyle.BinPackParameters = false;
   ChromiumStyle.DerivePointerAlignment = false;
-  ChromiumStyle.Standard = FormatStyle::LS_Cpp03;
   return ChromiumStyle;
 }
 
index 44429031d8977d74777deb29b1dced152576442f..a88464f3824aec65f78bda115990b0e7380028d4 100644 (file)
@@ -4672,6 +4672,8 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
   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;");