Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index b995717..829ea91 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1615,7 +1615,7 @@
     NewTD->setInvalidDecl();
 
   // Handle attributes prior to checking for duplicates in MergeVarDecl
-  ProcessDeclAttributes(NewTD, D);
+  ProcessDeclAttributes(S, NewTD, D);
   // Merge the decl with the existing one if appropriate. If the decl is
   // in an outer scope, it isn't the same thing.
   if (PrevDecl && isDeclInScope(PrevDecl, DC, S)) {
@@ -1801,7 +1801,7 @@
   NewVD->setLexicalDeclContext(CurContext);
 
   // Handle attributes prior to checking for duplicates in MergeVarDecl
-  ProcessDeclAttributes(NewVD, D);
+  ProcessDeclAttributes(S, NewVD, D);
 
   // Handle GNU asm-label extension (encoded as an attribute).
   if (Expr *E = (Expr*) D.getAsmLabel()) {
@@ -2298,7 +2298,7 @@
   // (for example to check for conflicts, etc).
   // FIXME: This needs to happen before we merge declarations. Then,
   // let attribute merging cope with attribute conflicts.
-  ProcessDeclAttributes(NewFD, D);
+  ProcessDeclAttributes(S, NewFD, D);
   AddKnownFunctionAttributes(NewFD);
 
   if (OverloadableAttrRequired && !NewFD->getAttr<OverloadableAttr>()) {
@@ -2907,7 +2907,7 @@
   if (II)
     IdResolver.AddDecl(New);
 
-  ProcessDeclAttributes(New, D);
+  ProcessDeclAttributes(S, New, D);
 
   if (New->hasAttr<BlocksAttr>()) {
     Diag(New->getLocation(), diag::err_block_on_nonlocal);
@@ -3628,7 +3628,7 @@
     New->setInvalidDecl();
 
   if (Attr)
-    ProcessDeclAttributeList(New, Attr);
+    ProcessDeclAttributeList(S, New, Attr);
 
   // If we're declaring or defining a tag in function prototype scope
   // in C, note that this type can only be used within the function.
@@ -3878,7 +3878,8 @@
   // FIXME: We need to pass in the attributes given an AST
   // representation, not a parser representation.
   if (D)
-    ProcessDeclAttributes(NewFD, *D);
+    // FIXME: What to pass instead of TUScope?
+    ProcessDeclAttributes(TUScope, NewFD, *D);
 
   if (T.isObjCGCWeak())
     Diag(Loc, diag::warn_attribute_weak_on_field);
@@ -3985,7 +3986,7 @@
   }
 
   // Process attributes attached to the ivar.
-  ProcessDeclAttributes(NewID, D);
+  ProcessDeclAttributes(S, NewID, D);
   
   if (D.isInvalidType())
     NewID->setInvalidDecl();
@@ -4151,7 +4152,7 @@
   }
 
   if (Attr)
-    ProcessDeclAttributeList(Record, Attr);
+    ProcessDeclAttributeList(S, Record, Attr);
 }
 
 EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum,