Changed SymbolContext so when you search for functions
it returns a list of functions as a SymbolContextList.

Rewrote the clients of SymbolContext to use this
SymbolContextList.

Rewrote some of the providers of the data to SymbolContext
to make them respect preferences as to whether the list
should be cleared first; propagated that change out.

ClangExpressionDeclMap and ClangASTSource use this new
function list to properly generate function definitions -
even for functions that don't have a prototype in the
debug information.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109476 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index 2ea2bce..3f83acf 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -146,3 +146,19 @@
     
     return Decl;
 }
+
+clang::NamedDecl *NameSearchContext::AddGenericFunDecl()
+{
+    QualType generic_function_type(ASTSource.Context.getFunctionType(ASTSource.Context.getSizeType(),   // result
+                                                                     NULL,                              // argument types
+                                                                     0,                                 // number of arguments
+                                                                     true,                              // variadic?
+                                                                     0,                                 // type qualifiers
+                                                                     false,                             // has exception specification?
+                                                                     false,                             // has any exception specification?
+                                                                     0,                                 // number of exceptions
+                                                                     NULL,                              // exceptions
+                                                                     FunctionType::ExtInfo()));         // defaults for noreturn, regparm, calling convention
+
+    return AddFunDecl(generic_function_type.getAsOpaquePtr());
+}