summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/merge-lambdas.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-07-03 07:51:41 +0000
committerHans Wennborg <hans@hanshq.net>2018-07-03 07:51:41 +0000
commitd3ea49f094bb01646e8e122af4babb2840d108b7 (patch)
tree3bb47369223acf5e2928cb6a1b4876a26fa3a6f5 /clang/test/Modules/merge-lambdas.cpp
parent9e0108d90cb11eb2a25e3019fa882d5032a709d5 (diff)
downloadbcm5719-llvm-d3ea49f094bb01646e8e122af4babb2840d108b7.tar.gz
bcm5719-llvm-d3ea49f094bb01646e8e122af4babb2840d108b7.zip
Revert r336021 "PR33924: merge local declarations that have linkage of some kind within"
This caused test failures in 32-bit builds (PR38015). > merged function definitions; also merge functions with deduced return > types. > > This seems like two independent fixes, but unfortunately they are hard > to separate because it's challenging to reliably test either one of them > without also testing the other. > > A complication arises with deduced return type support: we need the type > of the function in order to know how to merge it, but we can't load the > actual type of the function because it might reference an entity > declared within the function (and we need to have already merged the > function to correctly merge that entity, which we would need to do to > determine if the function types match). So we instead compare the > declared function type when merging functions, and defer loading the > actual type of a function with a deduced type until we've finished > loading and merging the function. llvm-svn: 336175
Diffstat (limited to 'clang/test/Modules/merge-lambdas.cpp')
-rw-r--r--clang/test/Modules/merge-lambdas.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/clang/test/Modules/merge-lambdas.cpp b/clang/test/Modules/merge-lambdas.cpp
deleted file mode 100644
index d14483aa3aa..00000000000
--- a/clang/test/Modules/merge-lambdas.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// RUN: %clang_cc1 -fmodules -verify %s
-// expected-no-diagnostics
-
-#pragma clang module build A
-module A {}
-#pragma clang module contents
-#pragma clang module begin A
-template<typename T> auto f() { return []{}; }
-#pragma clang module end
-#pragma clang module endbuild
-
-#pragma clang module build B
-module B {}
-#pragma clang module contents
-#pragma clang module begin B
-#pragma clang module import A
-inline auto x1() { return f<int>(); }
-inline auto z() { return []{}; }
-inline auto x2() { return z(); }
-#pragma clang module end
-#pragma clang module endbuild
-
-#pragma clang module build C
-module C {}
-#pragma clang module contents
-#pragma clang module begin C
-#pragma clang module import A
-inline auto y1() { return f<int>(); }
-inline auto z() { return []{}; }
-inline auto y2() { return z(); }
-inline auto q() { return []{}; }
-inline auto y3() { return q(); }
-#pragma clang module end
-#pragma clang module endbuild
-
-inline auto q() { return []{}; }
-inline auto x3() { return q(); }
-
-#pragma clang module import B
-#pragma clang module import C
-using T = decltype(x1);
-using T = decltype(y1);
-
-using U = decltype(x2);
-using U = decltype(y2);
-
-using V = decltype(x3);
-using V = decltype(y3);
OpenPOWER on IntegriCloud