summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/cxx-dtor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-07-04 02:25:38 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-07-04 02:25:38 +0000
commit600adef31bdb2dcc20f89a1633a55d27966e9de6 (patch)
treec6cc4cc98ec051e5605d0a2293b996c36a2c1e86 /clang/test/Modules/cxx-dtor.cpp
parentf18adbb3cb327d119e6ba595a211afcc4a6ba196 (diff)
downloadbcm5719-llvm-600adef31bdb2dcc20f89a1633a55d27966e9de6.tar.gz
bcm5719-llvm-600adef31bdb2dcc20f89a1633a55d27966e9de6.zip
PR33924: merge local declarations that have linkage of some kind within
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. This reverts r336175, reinstating r336021, with one change (for PR38015): we look at the TypeSourceInfo of the first-so-far declaration of each function when considering whether to merge two functions. This works around a problem where the calling convention in the TypeSourceInfo for subsequent redeclarations may not match if it was implicitly adjusted. llvm-svn: 336240
Diffstat (limited to 'clang/test/Modules/cxx-dtor.cpp')
-rw-r--r--clang/test/Modules/cxx-dtor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Modules/cxx-dtor.cpp b/clang/test/Modules/cxx-dtor.cpp
index 63427ee0afd..d685b69d511 100644
--- a/clang/test/Modules/cxx-dtor.cpp
+++ b/clang/test/Modules/cxx-dtor.cpp
@@ -1,3 +1,4 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs/cxx-dtor -emit-llvm-only %s
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs/cxx-dtor -emit-llvm-only %s -triple i686-windows
#include "b.h"
OpenPOWER on IntegriCloud