fix decl attributes cleaning
this plugs the leak of attributes and also fixes a crash in the test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 210f169..b4f4c3b 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -136,6 +136,7 @@
   void addAttr(Attr *attr);
   const Attr *getAttrs() const;
   void swapAttrs(Decl *D);
+  void invalidateAttrs();
 
   template<typename T> const T *getAttr() const {
     for (const Attr *attr = getAttrs(); attr; attr = attr->getNext())