Index: lib/Parse/ParseDecl.cpp
===================================================================
--- lib/Parse/ParseDecl.cpp	(revision 165089)
+++ lib/Parse/ParseDecl.cpp	(working copy)
@@ -155,7 +155,7 @@
           LA->Toks.push_back(Eof);
         } else {
           ParseGNUAttributeArgs(AttrName, AttrNameLoc, attrs, endLoc,
-                                0, AttrNameLoc, AttributeList::AS_GNU);
+                                0, SourceLocation(), AttributeList::AS_GNU);
         }
       } else {
         attrs.addNew(AttrName, AttrNameLoc, 0, AttrNameLoc,
@@ -929,7 +929,7 @@
         Actions.ActOnReenterFunctionContext(Actions.CurScope, D);
 
       ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, &endLoc,
-                            0, LA.AttrNameLoc, AttributeList::AS_GNU);
+                            0, SourceLocation(), AttributeList::AS_GNU);
 
       if (HasFunScope) {
         Actions.ActOnExitFunctionContext();
@@ -942,7 +942,7 @@
       // If there are multiple decls, then the decl cannot be within the
       // function scope.
       ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, &endLoc,
-                            0, LA.AttrNameLoc, AttributeList::AS_GNU);
+                            0, SourceLocation(), AttributeList::AS_GNU);
     }
   } else {
     Diag(Tok, diag::warn_attribute_no_decl) << LA.AttrName.getName();
Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp	(revision 165089)
+++ lib/Sema/SemaDecl.cpp	(working copy)
@@ -2774,7 +2774,8 @@
         TypeSpecType == DeclSpec::TST_enum) {
       AttributeList* attrs = DS.getAttributes().getList();
       while (attrs) {
-        Diag(attrs->getScopeLoc(),
+        Diag(attrs->getScopeLoc().isValid() ? 
+             attrs->getScopeLoc() : attrs->getLoc(),
              diag::warn_declspec_attribute_ignored)
         << attrs->getName()
         << (TypeSpecType == DeclSpec::TST_class ? 0 :
