summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-14 08:42:54 +0000
committerDaniel Jasper <djasper@google.com>2013-02-14 08:42:54 +0000
commiteead02b1b51770872c50c7c6176210fdab4a78f9 (patch)
treec5c3368ec0403a9bf3071f06970932f8e2ccc9b0 /clang/unittests
parent70247a807b3f6fa6f5996fd2184d6276c8e1d881 (diff)
downloadbcm5719-llvm-eead02b1b51770872c50c7c6176210fdab4a78f9.tar.gz
bcm5719-llvm-eead02b1b51770872c50c7c6176210fdab4a78f9.zip
Align superclasses for multiple inheritence.
This fixes llvm.org/PR15179. Before: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; After: class ColorChooserMac : public content::ColorChooser, public content::WebContentsObserver { }; llvm-svn: 175147
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index f72aad7aad6..b30e0deb56b 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -584,6 +584,25 @@ TEST_F(FormatTest, UnderstandsAccessSpecifiers) {
TEST_F(FormatTest, FormatsDerivedClass) {
verifyFormat("class A : public B {\n};");
verifyFormat("class A : public ::B {\n};");
+
+ verifyFormat(
+ "class AAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,\n"
+ " public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC {\n"
+ "};\n");
+ verifyFormat("class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA :\n"
+ " public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,\n"
+ " public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC {\n"
+ "};\n");
+ verifyFormat(
+ "class A : public B, public C, public D, public E, public F, public G {\n"
+ "};");
+ verifyFormat("class AAAAAAAAAAAA : public B,\n"
+ " public C,\n"
+ " public D,\n"
+ " public E,\n"
+ " public F,\n"
+ " public G {\n"
+ "};");
}
TEST_F(FormatTest, FormatsVariableDeclarationsAfterStructOrClass) {
@@ -1018,6 +1037,9 @@ TEST_F(FormatTest, PreventConfusingIndents) {
" ddd);");
}
+TEST_F(FormatTest, Inheritance) {
+}
+
TEST_F(FormatTest, ConstructorInitializers) {
verifyFormat("Constructor() : Initializer(FitsOnTheLine) {}");
verifyFormat("Constructor() : Inttializer(FitsOnTheLine) {}",
OpenPOWER on IntegriCloud