[cfe-dev] getAsString for Nullability Attributed array

Pearson White via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 17 19:41:25 PST 2019


When using clang::QualType.print or clang::QualType.getAsString for an arrays with Nullability attributes, the attribute appears before the square brackets.
For example: "int [_Nonnull]" in source would return "int _Nonnull[]" from getAsString. In this case, _Nonnull would be interpreted as applying to non-pointer type int which is invalid.
Is this a bug?

Thanks,
-Pearson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190118/07396a18/attachment.html>


More information about the cfe-dev mailing list