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

llvm-svn: 203237
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 872a26d..6eaf140 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -3501,8 +3501,8 @@
 void ValueDecl::anchor() { }
 
 bool ValueDecl::isWeak() const {
-  for (auto I : attrs())
-    if (isa<WeakAttr>(I) || isa<WeakRefAttr>(I))
+  for (attr_iterator I = attr_begin(), E = attr_end(); I != E; ++I)
+    if (isa<WeakAttr>(*I) || isa<WeakRefAttr>(*I))
       return true;
 
   return isWeakImported();