In code such as "char* volatile const j()", Clang warns that "volatile
const" will be ignored, but the error currently points to the location
of "const". The attached patch makes the error point to the location
of the first ignored qualifier.
Chandler: I've been looking at the FIXME in this code (it was added in
and I'm not sure what you mean when you say that we should find a
range that encompass all the qualifiers instead.
Do you mean that Loc should be a SourceRange, covering all ignored
qualifiers? But Sema::Diag() only expects a SourceLocation, not a
Or do you mean that the ConstFixIt, VolatileFixIt, RestrictFixIt
should be replaced by a single fixit, using to a range covering all
qualifiers? Does that make any real difference? Also, can we be sure
that these qualifiers are always consecutive (I'm too tired to think
that through at the moment).
ignored-qualifiers.patch (2.23 KB)