summaryrefslogtreecommitdiffstats
path: root/test/input
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-31 14:43:16 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-31 14:56:14 (GMT)
commit4402138958fac4e9eae008d8987aa2f14278d272 (patch)
tree0ddb90a01f81686a678d21fd48e8d4eff74e446b /test/input
parentc224a7968998ff627a2dcc3ab41f907c5f8541b0 (diff)
downloadCastXML-4402138958fac4e9eae008d8987aa2f14278d272.zip
CastXML-4402138958fac4e9eae008d8987aa2f14278d272.tar.gz
CastXML-4402138958fac4e9eae008d8987aa2f14278d272.tar.bz2
Output: Handle function types with no prototype
A FunctionType may be either FunctionProtoType or FunctionNoProtoType. Check that runtime downcasts to FunctionProtoType succeed before using them. For FunctionNoProtoType we will simply output the type "int()", which is compatible with gccxml format (gccxml never lacked prototypes because it always operates in C++ mode). In CastXML we can encounter functions with no prototype in C++ modes when traversing Clang buildins. GitHub-Issue: 1
Diffstat (limited to 'test/input')
-rw-r--r--test/input/FunctionNoProto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/input/FunctionNoProto.c b/test/input/FunctionNoProto.c
new file mode 100644
index 0000000..2e1b401
--- /dev/null
+++ b/test/input/FunctionNoProto.c
@@ -0,0 +1 @@
+int start();