DmitryPolukhin added inline comments. ================ Comment at: lib/Sema/SemaDeclAttr.cpp:3315 @@ +3314,3 @@ + llvm::APInt VectorSize(64, 0); + if (Str.size() >= 4 && Str[0] == 'V') { + // Minimal length of vector mode is 4: 'V' + NUMBER(>=1) + TYPE(>=2). ---------------- aaron.ballman wrote: > Can you have a vector of vectors with mode? I'm wondering why this isn't part > of parseModeAttr(), since this is parsing part of the mode attribute. No, it is not possible and more over it is not allowed to combine vector_size and vector mode (GCC does the same). Checks below prevent non-primitive types as vector elements.
================ Comment at: lib/Sema/SemaDeclAttr.cpp:3318 @@ +3317,3 @@ + int VectorStringLength = 0; + while (isdigit(Str[VectorStringLength + 1])) + ++VectorStringLength; ---------------- aaron.ballman wrote: > This will cause a buffer overrun on pathological code; should also constrain > based on the size of Str. Thank you for catching this! http://reviews.llvm.org/D14744 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits