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/test/CodeGen/merge-attrs.c b/test/CodeGen/merge-attrs.c
new file mode 100644
index 0000000..5ac0217
--- /dev/null
+++ b/test/CodeGen/merge-attrs.c
@@ -0,0 +1,13 @@
+// RUN: clang %s -emit-llvm
+
+void *malloc(int size) __attribute__ ((__nothrow__));
+
+inline static void __zend_malloc() {
+    malloc(1);
+}
+
+void *malloc(int size) __attribute__ ((__nothrow__));
+
+void fontFetch() {
+    __zend_malloc(1);
+}