[cfe-dev] Clang Static Analyzer: reporting a TypeLoc as error location?
Gábor Kozár
kozargabor at gmail.com
Mon Sep 2 09:36:38 PDT 2013
Hi,
I have some (AST-based) checkers that detect type bugs, i.e. cases
where a specific type is incorrect. Unfortunately, I cannot find any
way to make the Clang Static Analyzer accept a TypeLoc as the error
location, since PathDiagnosticLocation only has overloads for Stmt and
Decl. It also has one accepting a SourceLocation, but I want to
highlight the entire range. So I'd need either an overload accepting a
SourceRange, or two SourceLocations.
Currently I'm just displaying the variable/parameter definition as the
error location, which is all right, I guess, but not ideal. Is there
any way to achieve the above? The ability to report any SourceRange as
error location would be very useful, I believe.
Thanks!
Gabor
--
Gábor Kozár
kozargabor at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130902/8744bc2f/attachment.html>
More information about the cfe-dev
mailing list