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

Chris Lattner sabre at nondot.org
Sun Oct 25 10:21:41 PDT 2009


Author: lattner
Date: Sun Oct 25 12:21:40 2009
New Revision: 85058

URL: http://llvm.org/viewvc/llvm-project?rev=85058&view=rev
Log:
minor reorg: check both attributes before decl.

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=85058&r1=85057&r2=85058&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Oct 25 12:21:40 2009
@@ -71,6 +71,12 @@
       Diag(Loc, diag::warn_deprecated) << D->getDeclName();
   }
 
+  // See if the decl is unavailable
+  if (D->getAttr<UnavailableAttr>()) {
+    Diag(Loc, diag::warn_unavailable) << D->getDeclName();
+    Diag(D->getLocation(), diag::note_unavailable_here) << 0;
+  }
+  
   // See if this is a deleted function.
   if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
     if (FD->isDeleted()) {
@@ -80,12 +86,6 @@
     }
   }
 
-  // See if the decl is unavailable
-  if (D->getAttr<UnavailableAttr>()) {
-    Diag(Loc, diag::warn_unavailable) << D->getDeclName();
-    Diag(D->getLocation(), diag::note_unavailable_here) << 0;
-  }
-
   return false;
 }
 





More information about the cfe-commits mailing list