]> git.ozlabs.org Git - ccan/commitdiff
cppmagic: Tweak testcase to work on older clang versions
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 21 Nov 2016 14:05:37 +0000 (01:05 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 21 Nov 2016 14:05:37 +0000 (01:05 +1100)
clang version 3.4, for whatever reason, expands a few of the testcases
in cppmagic with slightly different whitespace from what we expect.  Since
this was changed in later clang versions, it was probably a compiler bug,
but it turns out an extra space in the testcase can make it pass on clang
3.4 as well.  This means we finally have clang builds working in Travis.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/cppmagic/test/run.c

index ee02c6c8d01f2ba1715f2d501a68335698cbb4a4..7c0aa7f6af0092e0f07b54dd9587058e3fae33a9 100644 (file)
@@ -15,7 +15,7 @@ static inline void check1(const char *orig, const char *expand,
 #define CHECK1(orig, match) \
        check1(#orig, CPPMAGIC_STRINGIFY(orig), match)
 
 #define CHECK1(orig, match) \
        check1(#orig, CPPMAGIC_STRINGIFY(orig), match)
 
-#define TESTRECURSE()  R CPPMAGIC_DEFER1(_TESTRECURSE)()()
+#define TESTRECURSE()  R CPPMAGIC_DEFER1(_TESTRECURSE) ()()
 #define _TESTRECURSE() TESTRECURSE
 
 #define TESTMAP1(x)    <<x>>
 #define _TESTRECURSE() TESTRECURSE
 
 #define TESTMAP1(x)    <<x>>