diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index eb75329461..001a6ac61d 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2402,6 +2402,12 @@ bool Sema::MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old, if (getLangOpts().CPlusPlus) return MergeCXXFunctionDecl(New, Old, S); + // Merge the function types so the we get the composite types for the return + // and argument types. + QualType Merged = Context.mergeTypes(Old->getType(), New->getType()); + if (!Merged.isNull()) + New->setType(Merged); + return false; } |