aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-10-10 13:36:20 +0000
committerAlexander Kornienko <alexfh@google.com>2013-10-10 13:36:20 +0000
commit01fe9f9f320dd4342664376f24eb1a0d004d03c8 (patch)
tree18ec8b144ca00ef70bd74015bd9eb3d25ae2c2f4 /unittests
parentfbac5c11d4ecd39f083a8d7247ddcb5a0a49c667 (diff)
downloadclang-01fe9f9f320dd4342664376f24eb1a0d004d03c8.tar.gz
Correctly detect colon in bit fields. Fixes PR17333.
Summary: Colon was incorrectly detected as a start of inheritance list. Fixed. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 10d7413d42..c77616c96b 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1635,6 +1635,10 @@ TEST_F(FormatTest, FormatsBitfields) {
" unsigned sClass : 8;\n"
" unsigned ValueKind : 2;\n"
"};");
+ verifyFormat("struct A {\n"
+ " int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : 1,\n"
+ " bbbbbbbbbbbbbbbbbbbbbbbbb;\n"
+ "};");
}
TEST_F(FormatTest, FormatsNamespaces) {