diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-07-03 07:51:41 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-07-03 07:51:41 +0000 |
commit | d3ea49f094bb01646e8e122af4babb2840d108b7 (patch) | |
tree | 3bb47369223acf5e2928cb6a1b4876a26fa3a6f5 /clang/test/Modules/merge-deduced-return.cpp | |
parent | 9e0108d90cb11eb2a25e3019fa882d5032a709d5 (diff) | |
download | bcm5719-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-deduced-return.cpp')
-rw-r--r-- | clang/test/Modules/merge-deduced-return.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/clang/test/Modules/merge-deduced-return.cpp b/clang/test/Modules/merge-deduced-return.cpp deleted file mode 100644 index 0a4de7b9755..00000000000 --- a/clang/test/Modules/merge-deduced-return.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// RUN: %clang_cc1 -fmodules -std=c++17 -verify %s -// RUN: %clang_cc1 -fmodules -std=c++17 -verify %s -DLOCAL -// expected-no-diagnostics - -#pragma clang module build A -module A {} -#pragma clang module contents -#pragma clang module begin A -inline auto f() { struct X {}; return X(); } -inline auto a = f(); -#pragma clang module end -#pragma clang module endbuild - -#pragma clang module build B -module B {} -#pragma clang module contents -#pragma clang module begin B -inline auto f() { struct X {}; return X(); } -inline auto b = f(); -#pragma clang module end -#pragma clang module endbuild - -#ifdef LOCAL -inline auto f() { struct X {}; return X(); } -inline auto b = f(); -#else -#pragma clang module import B -#endif - -#pragma clang module import A - -using T = decltype(a); -using T = decltype(b); |