diff options
author | Manuel Klimek <klimek@google.com> | 2013-01-21 13:58:54 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-01-21 13:58:54 +0000 |
commit | cdee74db63260b89a73fbdf0b726511e286af58f (patch) | |
tree | 42407ef018c791578e77673604f07ba162a5d84b /clang/unittests/Format/FormatTest.cpp | |
parent | 5f37c821547d2881ddc30ee03c990d96111458f5 (diff) | |
download | bcm5719-llvm-cdee74db63260b89a73fbdf0b726511e286af58f.tar.gz bcm5719-llvm-cdee74db63260b89a73fbdf0b726511e286af58f.zip |
Fixes detection of class template specializations.
Now correctly formats:
template <> class A<int> {} a;
llvm-svn: 173038
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 3c929a3f532..4725889247e 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1530,6 +1530,14 @@ TEST_F(FormatTest, UnderstandContextOfRecordTypeKeywords) { // Redefinition from nested context: verifyFormat("class A::B::C {} n;"); + // Template definitions. + // FIXME: This is still incorrectly handled at the formatter side. + verifyFormat("template <> struct X < 15, i < 3 && 42 < 50 && 33<28> {};"); + + // FIXME: + // This now gets parsed incorrectly as class definition. + // verifyFormat("class A<int> f() {}\nint n;"); + // Elaborate types where incorrectly parsing the structural element would // break the indent. verifyFormat("if (true)\n" |