================
@@ -1655,8 +1655,10 @@ static ExprResult LookupMemberExpr(Sema &S, LookupResult
&R,
// We disallow element access for ext_vector_type bool. There is no way to
// materialize a reference to a vector element as a pointer (each element
is
// one bit in the vector).
+ assert(MemberName.isIdentifier() &&
+ "Ext vector component name not an identifier!");
S.Diag(R.getNameLoc(), diag::err_ext_vector_component_name_illegal)
- << MemberName
+ << MemberName.getAsIdentifierInfo()->getName()
----------------
erichkeane wrote:
I would rather we remove the quotes from the diagnostic, and re-add them in the
string-ref being passed (OR, better, refactor that part to actually send the
component rather than the string ref). Having to do this work to get the
identifier that should be handled by the diagnostics engine isn't correct IMO.
That is, remove the quotes from the diag, and fix `CheckExtVectorComponent`,
not make this site worse.
https://github.com/llvm/llvm-project/pull/118186
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits