0

I am trying to make a source code which I can check by Clang Static Analyzer.

I am fully newbie in Obj C so I don't know how can I use these small code parts.

Here is the checkers list: http://clang-analyzer.llvm.org/available_checks.html#osx_checkers

osx.cocoa.AtSync (ObjC):

void test(id x) {
  if (!x)
    @synchronized(x) {} // warn: nil value used as mutex
}

I just need a 5-10 lines of code which I can test. I don't want to someone make codes for all checker, I just need an example for one.

Thanks!

tmsblgh
  • 517
  • 5
  • 21
  • 1
    That's a very broad question. Do you expect someone to provide code for each checked issue? – trojanfoe May 16 '16 at 10:49
  • No no, I hope someone can make a code for one checker, just in 5-10 lines. Maybe a hello world which contains this part: void test(id x) { if (!x) @synchronized(x) {} // warn: nil value used as mutex } I will edit my question. – tmsblgh May 16 '16 at 10:51

0 Answers0