//===--- Decl.cpp - Declaration AST Node Implementation -------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file implements the Decl subclasses.////===----------------------------------------------------------------------===//#include"clang/AST/Decl.h"#include"clang/AST/DeclCXX.h"#include"clang/AST/DeclObjC.h"#include"clang/AST/DeclTemplate.h"#include"clang/AST/ASTContext.h"#include"clang/AST/TypeLoc.h"#include"clang/AST/Stmt.h"#include"clang/AST/Expr.h"#include"clang/AST/ExprCXX.h"#include"clang/AST/PrettyPrinter.h"#include"clang/Basic/Builtins.h"#include"clang/Basic/IdentifierTable.h"#include"clang/Parse/DeclSpec.h"#include"llvm/Support/ErrorHandling.h"#include<vector>usingnamespaceclang;voidAttr::Destroy(ASTContext&C){if(Next){Next->Destroy(C);Next=0;}this->~Attr();C.Deallocate((void*)this);}/// \brief Return the TypeLoc wrapper for the type source info.TypeLocTypeSourceInfo::getTypeLoc()const{returnTypeLoc(Ty,(void*)(this+1));}//===----------------------------------------------------------------------===//// NamedDecl Implementation//===----------------------------------------------------------------------===//staticNamedDecl::LinkagegetLinkageForNamespaceScopeDecl(constNamedDecl*D){assert(D->getDeclContext()->getLookupContext()->isFileContext()&&"Not a name having namespace scope"