summaryrefslogtreecommitdiff
path: root/tests/headers/macro-expr-basic.h
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-08 19:35:27 -0600
committerGitHub <noreply@github.com>2016-11-08 19:35:27 -0600
commit8d83bdfb48e292abd7db5a3093aefce0c893d3a5 (patch)
tree09c1ed40339abb5620e66ebaf31eebe7150e1ba1 /tests/headers/macro-expr-basic.h
parentc9eccea095a77989950410bf2715d59a8af7a1fd (diff)
parent4ee31ce84edc5d556139808c45d4409185e5bc66 (diff)
Auto merge of #219 - emilio:macros, r=fitzgen
Parse macro expressions. Clang is trolling me really hard so I'm going to see if the extra token I'm always getting is LLVM 3.9 specific.
Diffstat (limited to 'tests/headers/macro-expr-basic.h')
-rw-r--r--tests/headers/macro-expr-basic.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/headers/macro-expr-basic.h b/tests/headers/macro-expr-basic.h
new file mode 100644
index 00000000..55b11367
--- /dev/null
+++ b/tests/headers/macro-expr-basic.h
@@ -0,0 +1,12 @@
+#define FOO 1
+#define BAR 4
+#define BAZ (FOO + BAR)
+
+#define BARR (1 << 0)
+#define BAZZ ((1 << 1) + BAZ)
+#define I_RAN_OUT_OF_DUMB_NAMES (BARR | BAZZ)
+
+/* I haz a comment */
+#define HAZ_A_COMMENT BARR
+
+#define HAZ_A_COMMENT_INSIDE (/* comment for real */ BARR + FOO)