aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-21 10:17:14 +0000
committerManuel Klimek <klimek@google.com>2013-01-21 10:17:14 +0000
commit7f5b025e9b9a981a257d83063064ac6e58239d76 (patch)
tree6c9178c376e31b8bb481191debcd67c5d2032556 /unittests/Format/FormatTest.cpp
parentc44ee89cb448e34aada006b707eb45a1280f31e3 (diff)
Allow for nested name specifiers in record declarations.
Now correctly formats: class A::B {} n; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 1d3463ccfd..3c929a3f53 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1519,13 +1519,17 @@ TEST_F(FormatTest, UnderstandContextOfRecordTypeKeywords) {
// Actual definitions...
verifyFormat("struct {} n;");
- verifyFormat("template <template <class T, class Y>, class Z > class X {} n;");
+ verifyFormat(
+ "template <template <class T, class Y>, class Z > class X {} n;");
verifyFormat("union Z {\n int n;\n} x;");
verifyFormat("class MACRO Z {} n;");
verifyFormat("class MACRO(X) Z {} n;");
verifyFormat("class __attribute__(X) Z {} n;");
verifyFormat("class __declspec(X) Z {} n;");
+ // Redefinition from nested context:
+ verifyFormat("class A::B::C {} n;");
+
// Elaborate types where incorrectly parsing the structural element would
// break the indent.
verifyFormat("if (true)\n"