Introduced support for UnknownAnyTy, the Clang type
representing variables whose type must be inferred
from the way they are used. Functions without debug
information now return UnknownAnyTy and must be cast.
Variables with no debug information are not yet using
UnknownAnyTy; instead they are assumed to be void*.
Support for variables of unknown type is coming (and,
in fact, some relevant support functions are included
in this commit) but will take a bit of extra effort.
The testsuite has also been updated to reflect the new
requirement that the result of printf be cast, i.e.
expr (int) printf("Hello world!")
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131263 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index f3526a7..d91f2f1 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -232,9 +232,9 @@
proto_info.Variadic = true;
- QualType generic_function_type(m_ast_source.m_ast_context.getFunctionType (m_ast_source.m_ast_context.getSizeType(), // result
- NULL, // argument types
- 0, // number of arguments
+ QualType generic_function_type(m_ast_source.m_ast_context.getFunctionType (m_ast_source.m_ast_context.UnknownAnyTy, // result
+ NULL, // argument types
+ 0, // number of arguments
proto_info));
return AddFunDecl(generic_function_type.getAsOpaquePtr());