summaryrefslogtreecommitdiffstats
path: root/test/modularize
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-08-09 00:22:20 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-08-09 00:22:20 +0000
commit3d4563862758c68427832b99e0059d4bd1468a14 (patch)
tree3924f18a80fa26ed5935074b0c7dcb15e8d313f0 /test/modularize
parent01ff781921a9c690297eedcd32b81103e3d38b5e (diff)
Fix false error message for function-style macro instance used as arguments in other function-style macros instances, and add test for it.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/modularize')
-rw-r--r--test/modularize/Inputs/NestedMacro.h5
-rw-r--r--test/modularize/NoProblemsNestedMacro.modularize3
2 files changed, 8 insertions, 0 deletions
diff --git a/test/modularize/Inputs/NestedMacro.h b/test/modularize/Inputs/NestedMacro.h
new file mode 100644
index 00000000..2cfc92c0
--- /dev/null
+++ b/test/modularize/Inputs/NestedMacro.h
@@ -0,0 +1,5 @@
+// Verification of fix for nested macro.
+
+#define FUNCMACROINNER(a) a
+#define FUNCMACROOUTER(b, c) FUNCMACROINNER(b) + FUNCMACROINNER(c)
+int FuncMacroValue = FUNCMACROOUTER(1, 2);
diff --git a/test/modularize/NoProblemsNestedMacro.modularize b/test/modularize/NoProblemsNestedMacro.modularize
new file mode 100644
index 00000000..a1c627d2
--- /dev/null
+++ b/test/modularize/NoProblemsNestedMacro.modularize
@@ -0,0 +1,3 @@
+# RUN: modularize %s -x c++
+
+Inputs/NestedMacro.h