summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-02-23 00:26:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-02-23 00:26:28 +0000
commit16c8cf0e11dd7f53d3a50609d5821f56e6b52c1a (patch)
treeeb36aec59db85b432616af7aa244a275efdaa82f /clang/lib/Sema/SemaOverload.cpp
parent47f9f2d1e670f700f18800a09c2a4fcd410658aa (diff)
downloadbcm5719-llvm-16c8cf0e11dd7f53d3a50609d5821f56e6b52c1a.tar.gz
bcm5719-llvm-16c8cf0e11dd7f53d3a50609d5821f56e6b52c1a.zip
Remove the hack that avoided mangling static functions in extern C contexts.
Weather we should give C language linkage to functions and variables with internal linkage probably depends on how much code assumes it. The standard says they should have no language linkage, but gcc and msvc assign them C language linkage. This commit removes the hack that was preventing the mangling on static functions declare in extern C contexts. It is an experiment to see if we can implement the rules in the standard. If it turns out that many users depend on these functions and variables having C language linkage, we should change isExternC instead and try to convince the CWG to change the standard. llvm-svn: 175937
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 20fb7a768be..9bba5f6c78d 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -974,14 +974,6 @@ static bool canBeOverloaded(const FunctionDecl &D) {
if (D.isMain())
return false;
- // FIXME: Users assume they know the mangling of static functions
- // declared in extern "C" contexts. For now just disallow overloading these
- // functions so that we can avoid mangling them.
- const DeclContext *DC = D.getDeclContext();
- if (!DC->isRecord() &&
- D.getFirstDeclaration()->getDeclContext()->isExternCContext())
- return false;
-
return true;
}
OpenPOWER on IntegriCloud