summaryrefslogtreecommitdiff
path: root/test/SemaCXX/function-extern-c.cpp
Commit message (Collapse)AuthorAge
* Diagnose about extern "C" functions returning c++ objectsFariborz Jahanian2013-03-14
| | | | | | | on first declaration only. // rdar://13364028 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177127 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fixRafael Espindola2013-02-14
| | | | | | | | | | | | | | | some cases where functions with no language linkage were being treated as having C language linkage. In particular, don't warn in extern "C" { static NonPod foo(); } Since getLanguageLinkage checks the language linkage, the linkage computation cannot use the language linkage. Break the loop by checking just the context in the linkage computation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175117 91177308-0d34-0410-b5e6-96231b3b80d8
* Use hasCLanguageLinkage when warning about non C return types.Rafael Espindola2012-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171263 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak warning text for returning incomplete type from extern "C" functions.Hans Wennborg2012-07-24
| | | | | | | | | | A warning was added in r150128 for returning non-C compatible user-defined types from functions with C linkage. This makes the text more clear for the case when the type isn't decidedly non-C compatible, but incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160681 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding support for warning when a non-C compatible user-defined type is ↵Aaron Ballman2012-02-09
returned from an extern "C" function. Fixes bug 6143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150128 91177308-0d34-0410-b5e6-96231b3b80d8