]> granicus.if.org Git - clang/commit
Revert r336021 "PR33924: merge local declarations that have linkage of some kind...
authorHans Wennborg <hans@hanshq.net>
Tue, 3 Jul 2018 07:51:41 +0000 (07:51 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 3 Jul 2018 07:51:41 +0000 (07:51 +0000)
commitcfd5890f82db858d610ec28a9fbb44e0e853c8c0
treebff5cf1efed476da3de24958c9925f565ec49b46
parentaa3be4e3c06473db5996695a3ab9755aee5f9f9d
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336175 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Serialization/ASTCommon.cpp
lib/Serialization/ASTReaderDecl.cpp
test/Modules/merge-deduced-return.cpp [deleted file]
test/Modules/merge-lambdas.cpp [deleted file]
test/Modules/merge-static-locals.cpp [deleted file]