]> granicus.if.org Git - clang/commitdiff
Formatter: Enable @encode test.
authorNico Weber <nicolasweber@gmx.de>
Fri, 18 Jan 2013 05:11:47 +0000 (05:11 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 18 Jan 2013 05:11:47 +0000 (05:11 +0000)
This doesn't work right with pointers to pointers, but that's likely just a
dupe of PR14884.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172785 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Format/FormatTest.cpp

index a762068ce9e3b090deffbded814aa46fb25559c5..c3fef1d40155321b8cd2bf0b0236afa63ad14b43 100644 (file)
@@ -1860,13 +1860,15 @@ TEST_F(FormatTest, ObjCAt) {
 }
 
 TEST_F(FormatTest, ObjCSnippets) {
-  // FIXME: Make the uncommented lines below pass.
   verifyFormat("@autoreleasepool {\n"
                "  foo();\n"
                "}");
   verifyFormat("@class Foo, Bar;");
   verifyFormat("@compatibility_alias AliasName ExistingClass;");
   verifyFormat("@dynamic textColor;");
+  verifyFormat("char *buf1 = @encode(int *);");
+  verifyFormat("char *buf1 = @encode(typeof(4 * 5));");
+  // FIXME: Enable once PR14884 is fixed:
   //verifyFormat("char *buf1 = @encode(int **);");
   verifyFormat("Protocol *proto = @protocol(p1);");
   verifyFormat("SEL s = @selector(foo:);");