[PATCH] D25001: [Module] Merge function prototype with a non-prototype function declaration
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 17:09:34 PDT 2017
ahatanak updated this revision to Diff 92742.
ahatanak added a comment.
Update patch.
1. In isSameEntity, call typesAreCompatible instead of hasSameType so that non-prototype function declarations are merged with function prototypes.
2. Define a function (mergeCompatibleFunctionDecls) that changes the type of non-prototype functions declarations and adds parameters.
3. Make hasSameOverloadableAttrs check the presence of noreturn function attributes. Without this change, test/Modules/redecl-merge.m would fail after making the changes in 1.
4. Add a test case that declares a non-prototype declaration in the header and function prototype in the .c file.
https://reviews.llvm.org/D25001
Files:
lib/Serialization/ASTReaderDecl.cpp
test/Modules/Inputs/merge-non-prototype-fn/header2.h
test/Modules/Inputs/merge-non-prototype-fn/module.map
test/Modules/merge-non-prototype-fn.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25001.92742.patch
Type: text/x-patch
Size: 5105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170323/70fd295e/attachment.bin>
More information about the cfe-commits
mailing list