diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-15 22:43:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-15 22:43:40 +0000 |
commit | 76a642ff4fce7a0648c79a1f01324a8c3880e251 (patch) | |
tree | 49205207a366e1972e9e3a77f39d3f2fbe376e12 /lib/Sema/SemaDecl.cpp | |
parent | b6d74a158a9c002e3c0fcbda8ad8d0ccbb2e5088 (diff) |
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
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 37e1f54f7f..a80507ae4e 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 @@ DeclContext *Sema::getContainingDC(DeclContext *DC) { 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."); |