summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge/class/test.cpp
diff options
context:
space:
mode:
authorPeter Szecsi <szepet95@gmail.com>2018-04-25 17:28:03 +0000
committerPeter Szecsi <szepet95@gmail.com>2018-04-25 17:28:03 +0000
commitb180eebed4239e45822b6d20f97241583bdc054b (patch)
treec34b42ccbb9c901ab278304421abf7541d4bf10d /clang/test/ASTMerge/class/test.cpp
parentcd8688a4c26540c4d03e5f1ac6566e7cd29bddc5 (diff)
downloadbcm5719-llvm-b180eebed4239e45822b6d20f97241583bdc054b.tar.gz
bcm5719-llvm-b180eebed4239e45822b6d20f97241583bdc054b.zip
[ASTImporter] FriendDecl importing improvements
There are only a few cases of importing a frienddecl which is currently supported. This patch aims to improve the friend import process. Set FriendObjectKind in case of decls, insert friend into the friend chain correctly, checks structurally equivalent in a more advanced manner. Test cases added as well. llvm-svn: 330847
Diffstat (limited to 'clang/test/ASTMerge/class/test.cpp')
-rw-r--r--clang/test/ASTMerge/class/test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/class/test.cpp b/clang/test/ASTMerge/class/test.cpp
index a68a2d1d769..99926b649bc 100644
--- a/clang/test/ASTMerge/class/test.cpp
+++ b/clang/test/ASTMerge/class/test.cpp
@@ -12,3 +12,13 @@
// CHECK: class1.cpp:18:6: warning: type 'E' has incompatible definitions in different translation units
// CHECK: class1.cpp:19:3: note: enumerator 'b' with value 1 here
// CHECK: class2.cpp:12:3: note: enumerator 'a' with value 0 here
+
+// CHECK: class1.cpp:36:8: warning: type 'F2' has incompatible definitions in different translation units
+// CHECK: class1.cpp:39:3: note: friend declared here
+// CHECK: class2.cpp:30:8: note: no corresponding friend here
+
+// CHECK: class1.cpp:43:8: warning: type 'F3' has incompatible definitions in different translation units
+// CHECK: class1.cpp:46:3: note: friend declared here
+// CHECK: class2.cpp:36:8: note: no corresponding friend here
+
+// CHECK: 4 warnings generated.
OpenPOWER on IntegriCloud