infer icon indicating copy to clipboard operation
infer copied to clipboard

objc code ignored by Known incorrect assumption in the frontend: Expected source expression for OpaqueValueExpr

Open Fistice opened this issue 2 years ago • 0 comments

  • Infer version v1.1.0
  • MacOS Monterey 12.5.1, MacBook Pro (16-inch, 2019)
  • command:
 xcodebuild clean -target Testaaa -arch x86_64  -configuration Debug
 xcodebuild -target Testaaa -arch x86_64  -configuration Debug | xcpretty -r json-compilation-database -o compile.json
 infer run --compilation-database compile.json --keep-going 
  • Log: https://gist.github.com/Fistice/5caa1beeb724a9b29d1dd3eed9865b73
  • source code: https://gist.github.com/Fistice/3114af71fa9cf852735730a0904849a4
  • output: https://gist.github.com/Fistice/f4758e7490abc68b9cc150b47cb9502a

When code like

NSString *string;
if(string.length) 
{
    xxx
}
if(_string)
{
    xxx
}

and run infer, it will be ignored and output as

Aborting translation of method 'TestObjAAA.test02' in file 'Testaaa/main.m'
Known incorrect assumption in the frontend: Expected source expression for OpaqueValueExpr

In source code, test01, 02, 05, 06 and 10 are ignored. image I don't see this in known issues. How to solve it?

Fistice avatar Sep 08 '22 05:09 Fistice