[cfe-dev] Clang Static Analyzer: Checking absence of method definition

Vu Le minhvule at gmail.com
Tue Mar 8 10:58:42 PST 2011


Hi Ted,
Thank you for your fast response.

I add a new file UnhandledMemoryWarningChecker.cpp under Checker.
Rebuilding Clang generates this error
*UnhandledMemoryWarningChecker.cpp:59: error: ‘void
clang::ento::registerUnhandledMemoryWarningChecker(clang::ento::CheckerManager&)’
should have been declared inside ‘clang::ento’*

I couldn't find the documentation for adding a new Checker.
What are the steps to define a new checker?

Thanks again.
Vu

On Mon, Mar 7, 2011 at 7:20 PM, Ted Kremenek <kremenek at apple.com> wrote:

> Take a look at CheckObjCDealloc.cpp, which warns about incomplete -dealloc
> implementations.  Diagnostics still need a source location, but they can
> refer to the location of the @interface or @implementation (for example).
>
> On Mar 7, 2011, at 4:28 PM, Vu Le wrote:
>
> Hi all,
>
> I want to write a checker that checks whether a handler method,
> for example "didReceiveMemoryWarning", has been implemented.
>
> Based on what I read from the source code, most checkers find
> violations in a specific location. Is there a way to check
> the absence of implementing handler?
>
> Thanks.
> Vu Le
>  _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110308/5e0534a1/attachment.html>


More information about the cfe-dev mailing list