[ASTImporter] Support LambdaExprs and improve template support
Also, a number of style and bug fixes was done: * ASTImporterTest: added sanity check for source node * ExternalASTMerger: better lookup for template specializations * ASTImporter: don't add templated declarations into DeclContext * ASTImporter: introduce a helper, ImportTemplateArgumentListInfo getting SourceLocations * ASTImporter: proper set ParmVarDecls for imported FunctionProtoTypeLoc Differential Revision: https://reviews.llvm.org/D42301 llvm-svn: 323519
This commit is contained in:
8
clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp
Normal file
8
clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
template<typename T> constexpr T add(T arg1, T arg2) {
|
||||
return arg1 + arg2;
|
||||
}
|
||||
|
||||
template<> constexpr int add(int arg1, int arg2) {
|
||||
return arg1 + arg2 + 2;
|
||||
}
|
||||
Reference in New Issue
Block a user