From f4daa217938a68285ffe697cbf107b0c9e957707 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 24 Sep 2014 17:17:32 +0000 Subject: [PATCH] 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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218392 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/Format.cpp | 1 - unittests/Format/FormatTest.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 2948ec48cd..e70bad9f3b 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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; } diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 44429031d8..a88464f382 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -4672,6 +4672,8 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) { EXPECT_EQ("A<::A> a;", format("A< ::A> a;", getGoogleStyle())); EXPECT_EQ("A<::A> a;", format("A<::A > a;", getGoogleStyle())); + verifyFormat("A> a;", getChromiumStyle(FormatStyle::LK_Cpp)); + verifyFormat("test >> a >> b;"); verifyFormat("test << a >> b;"); -- 2.40.0