[cfe-commits] r142145 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sun Oct 16 11:19:16 PDT 2011


Author: cornedbee
Date: Sun Oct 16 13:19:16 2011
New Revision: 142145

URL: http://llvm.org/viewvc/llvm-project?rev=142145&view=rev
Log:
Check for unavailable declarations in Sema::CanUseDecl.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=142145&r1=142144&r2=142145&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Oct 16 13:19:16 2011
@@ -53,6 +53,12 @@
     if (FD->isDeleted())
       return false;
   }
+
+  // See if this function is unavailable.
+  if (D->getAvailability() == AR_Unavailable &&
+      cast<Decl>(CurContext)->getAvailability() != AR_Unavailable)
+    return false;
+
   return true;
 }
 





More information about the cfe-commits mailing list