summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge
diff options
context:
space:
mode:
authorGabor Marton <martongabesz@gmail.com>2018-06-27 13:32:50 +0000
committerGabor Marton <martongabesz@gmail.com>2018-06-27 13:32:50 +0000
commit5254e64a8e6c23bfee24afb176f0edf3a9797cf3 (patch)
treeeef8fa9df9e1a010bc206abcf045ff40a1426df7 /clang/test/ASTMerge
parent1cdd816c125ab56661a9066b5e4932c658805e3b (diff)
downloadbcm5719-llvm-5254e64a8e6c23bfee24afb176f0edf3a9797cf3.tar.gz
bcm5719-llvm-5254e64a8e6c23bfee24afb176f0edf3a9797cf3.zip
Re-apply: [ASTImporter] Import the whole redecl chain of functions
Summary: With this patch when any `FunctionDecl` of a redeclaration chain is imported then we bring in the whole declaration chain. This involves functions and function template specializations. Also friend functions are affected. The chain is imported as it is in the "from" tu, the order of the redeclarations are kept. I also changed the lookup logic in order to find friends, but first making them visible in their declaration context. We may have long redeclaration chains if all TU contains the same prototype, but our measurements shows no degradation in time of CTU analysis (Tmux, Xerces, Bitcoin, Protobuf). Also, as further work we could squash redundant prototypes, but first ensure that functionality is working properly; then should we optimize. This may seem like a huge patch, sorry about that. But, most of the changes are new tests, changes in the production code is not that much. I also tried to create a smaller patch which does not affect specializations, but that patch failed to pass some of the `clang-import-test`s because there we import function specializations. Also very importantly, we can't just change the import of `FunctionDecl`s without changing the import of function template specializations because they are handled as `FunctionDecl`s. Reviewers: a.sidorin, r.stahl, xazax.hun, balazske, a_sidorin Reviewed By: a_sidorin Subscribers: labath, aprantl, a_sidorin, rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47532 Re-apply commit rC335480 llvm-svn: 335731
Diffstat (limited to 'clang/test/ASTMerge')
-rw-r--r--clang/test/ASTMerge/class/test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/ASTMerge/class/test.cpp b/clang/test/ASTMerge/class/test.cpp
index 99926b649bc..ba553af4072 100644
--- a/clang/test/ASTMerge/class/test.cpp
+++ b/clang/test/ASTMerge/class/test.cpp
@@ -13,12 +13,12 @@
// 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: 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: 4 warnings generated.
OpenPOWER on IntegriCloud