Refactor the deprecated and unavailable checks into a new
DiagnoseUseOfDeprecatedDecl method.  This ensures that they
are treated consistently.  This gets us 'unavailable' support
on a few new types of decls, and makes sure we consistently
silence deprecated when the caller is also deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 37e1f54..a80507a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -28,7 +28,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include <algorithm>
 #include <functional>
-
 using namespace clang;
 
 /// \brief If the identifier refers to a type name within this scope,
@@ -78,8 +77,8 @@
     if (MD->isOutOfLineDefinition())
       return MD->getLexicalDeclContext();
 
-    // A C++ inline method is parsed *after* the topmost class it was declared in
-    // is fully parsed (it's "complete").
+    // A C++ inline method is parsed *after* the topmost class it was declared
+    // in is fully parsed (it's "complete").
     // The parsing of a C++ inline method happens at the declaration context of
     // the topmost (non-nested) class it is lexically declared in.
     assert(isa<CXXRecordDecl>(MD->getParent()) && "C++ method not in Record.");