summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-01-14 08:08:52 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-01-14 08:08:52 +0000
commit53bfa51bec043fe14308e452a04f7a87df8bb8a6 (patch)
tree7c6242a7a42d207f980df60f70bd45daa180e25f
parentb59831d670e685f97ed51782907c50d668ae8108 (diff)
Sema: It's cheaper to ask LookupResult::empty than to calculate linkage
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225960 91177308-0d34-0410-b5e6-96231b3b80d8
-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 b967e17148..007470344f 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -8059,7 +8059,7 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
// the function returns a UDT (class, struct, or union type) that is not C
// compatible, and if it does, warn the user.
// But, issue any diagnostic on the first declaration only.
- if (NewFD->isExternC() && Previous.empty()) {
+ if (Previous.empty() && NewFD->isExternC()) {
QualType R = NewFD->getReturnType();
if (R->isIncompleteType() && !R->isVoidType())
Diag(NewFD->getLocation(), diag::warn_return_value_udt_incomplete)