aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added inline comments.


================
Comment at: include/clang/Basic/Attr.td:1949
+  let Args = [UnsignedArgument<"VectorWidth">];
+  let Subjects = SubjectList<[Function], ErrorDiag>;
+  let Documentation = [Undocumented];
----------------
Should this apply to Objective-C methods? What about other function-like 
interfaces such as function pointers?


================
Comment at: include/clang/Basic/Attr.td:1950
+  let Subjects = SubjectList<[Function], ErrorDiag>;
+  let Documentation = [Undocumented];
+}
----------------
No new, undocumented attributes, please.


================
Comment at: lib/Sema/SemaDeclAttr.cpp:2955
+  if (Existing && Existing->getVectorWidth() != VecWidth)
+    S.Diag(AL.getLoc(), diag::warn_duplicate_attribute) << AL.getName();
+
----------------
Do you want to drop one of the attributes in this case?


================
Comment at: test/Sema/attr-min-vector-width.c:8
+
+void f3(void) __attribute__((__min_vector_width__(128), 
__min_vector_width__(256))); /* expected-warning {{attribute 
'__min_vector_width__' is already applied with different parameters}} */
----------------
Also missing tests for applying the attribute to the wrong subject and with the 
incorrect number of arguments.


https://reviews.llvm.org/D48617



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to