Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.

llvm-svn: 203237
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 887b93a..28f85d7 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -2638,11 +2638,12 @@
     return Result.TakeString();
   }
 
-  for (auto i = ND->specific_attr_begin<AnnotateAttr>(),
-            e = ND->specific_attr_end<AnnotateAttr>(); i != e; ++i)
-    Result.AddAnnotation(
-        Result.getAllocator().CopyString((*i)->getAnnotation()));
-
+  for (Decl::attr_iterator i = ND->attr_begin(); i != ND->attr_end(); ++i) {
+    if (AnnotateAttr *Attr = dyn_cast_or_null<AnnotateAttr>(*i)) {
+      Result.AddAnnotation(Result.getAllocator().CopyString(Attr->getAnnotation()));
+    }
+  }
+  
   AddResultTypeChunk(Ctx, Policy, ND, Result);
   
   if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(ND)) {