[cfe-commits] r149008 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp test/Analysis/CFContainers.mm

NAKAMURA Takumi geek4civic at gmail.com
Wed Jan 25 17:27:28 PST 2012


2012/1/26 Anna Zaks <ganna at apple.com>:
> Author: zaks
> Date: Wed Jan 25 19:05:43 2012
> New Revision: 149008
>
> URL: http://llvm.org/viewvc/llvm-project?rev=149008&view=rev
> Log:
> [analyzer] Add an AST checker that checks for a common pitfall when
> using CFArrayCreate & family.
>
> Specifically, CFArrayCreate's input should be:
> 'A C array of the pointer-sized values to be in the new array.'
>
> (radar://10717339)
>
> Added:
>    cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
>    cfe/trunk/test/Analysis/CFContainers.mm
> Modified:
>    cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
>    cfe/trunk/lib/StaticAnalyzer/Checkers/Checkers.td

Anna,
On msvc build, I saw test failure. Any idea?

error: 'warning' diagnostics expected but not seen:
  Line 96: The first argument to 'CFArrayCreate' must be a C array of
pointer-sized
  Line 102: The first argument to 'CFSetCreate' must be a C array of
pointer-sized values
  Line 125: The second argument to 'CFDictionaryCreate' must be a C
array of pointer-sized values
3 errors generated.

...Takumi




More information about the cfe-commits mailing list