aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-12-30 20:40:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-12-30 20:40:41 +0000
commitde210a51dc26de6bee00a9ab172111c6f245a9fe (patch)
treef0856104c421ad51e02e277b7eb5574c11b65cf4 /lib/Sema/SemaDecl.cpp
parentaa7dbafc3539868ce271cb336444ec544260905a (diff)
Use hasCLanguageLinkage when warning about non C return types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index c9d0c7750c..8d3abe7301 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -6266,7 +6266,7 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
// If this function is declared as being extern "C", then check to see if
// the function returns a UDT (class, struct, or union type) that is not C
// compatible, and if it does, warn the user.
- if (NewFD->isExternC()) {
+ if (NewFD->hasCLanguageLinkage()) {
QualType R = NewFD->getResultType();
if (R->isIncompleteType() && !R->isVoidType())
Diag(NewFD->getLocation(), diag::warn_return_value_udt_incomplete)