//===--- SemaDeclAttr.cpp - Declaration Attribute Handling ----------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file implements decl-related attribute processing.////===----------------------------------------------------------------------===//#include"Sema.h"#include"clang/AST/ASTContext.h"#include"clang/AST/DeclObjC.h"#include"clang/AST/Expr.h"#include"clang/Basic/TargetInfo.h"#include"clang/Parse/DeclSpec.h"#include<llvm/ADT/StringExtras.h>usingnamespaceclang;//===----------------------------------------------------------------------===//// Helper functions//===----------------------------------------------------------------------===//staticconstFunctionType*getFunctionType(Decl*d){QualTypeTy;if(ValueDecl*decl=dyn_cast<ValueDecl>(d))Ty=decl->getType();elseif(FieldDecl*decl=dyn_cast<FieldDecl>(d))Ty=decl->getType();elseif(TypedefDecl*decl=dyn_cast<TypedefDecl>(d))Ty=decl->getUnderlyingType();