Test for virtual instead of pure here. It has the exact same effect, and John
authorNick Lewycky <nicholas@mxc.ca>
Tue, 5 Feb 2013 06:20:31 +0000 (06:20 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 5 Feb 2013 06:20:31 +0000 (06:20 +0000)
claims it will improve performance.

llvm-svn: 174341

clang/lib/Sema/SemaExpr.cpp

index 0d046f1..d0aa697 100644 (file)
@@ -11192,7 +11192,7 @@ void Sema::MarkDeclRefReferenced(DeclRefExpr *E) {
   // if it's a qualified reference.
   bool OdrUse = true;
   if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(E->getDecl()))
-    if (Method->isPure())
+    if (Method->isVirtual())
       OdrUse = false;
   MarkExprReferenced(*this, E->getLocation(), E->getDecl(), E, OdrUse);
 }