summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge/function-cpp/Inputs
diff options
context:
space:
mode:
authorAleksei Sidorin <a.sidorin@samsung.com>2018-01-26 11:36:54 +0000
committerAleksei Sidorin <a.sidorin@samsung.com>2018-01-26 11:36:54 +0000
commit8fc8510cb8dab5857e62870e976dfa7feca3fca7 (patch)
tree987fca5b298b2c15fa7be4579f9ea381df60058b /clang/test/ASTMerge/function-cpp/Inputs
parent24f0fa34c2e8d01ce97008f0f664016378079a92 (diff)
downloadbcm5719-llvm-8fc8510cb8dab5857e62870e976dfa7feca3fca7.tar.gz
bcm5719-llvm-8fc8510cb8dab5857e62870e976dfa7feca3fca7.zip
[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
Diffstat (limited to 'clang/test/ASTMerge/function-cpp/Inputs')
-rw-r--r--clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp b/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp
new file mode 100644
index 00000000000..ee97a1a8a5d
--- /dev/null
+++ b/clang/test/ASTMerge/function-cpp/Inputs/function-1.cpp
@@ -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;
+}
OpenPOWER on IntegriCloud