Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174020 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 5dc2a6a..5764355 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -396,7 +396,7 @@
if (decl->hasAttr<WeakRefAttr>()) continue;
if (FunctionDecl *fn = dyn_cast<FunctionDecl>(decl)) {
- if (fn->isPure() || fn->hasBody())
+ if (fn->isDefined())
continue;
} else {
if (cast<VarDecl>(decl)->hasDefinition() != VarDecl::DeclarationOnly)