Open pastel001 opened 1 year ago
维护infer的成本比较高,clang官方增加的特性都可能潜在导致infer不能工作,太难了
将-ivfsstatcache参数移除掉即可
You can use --clang-block-listed-flags-with-arg -ivfsstatcache
so that infer doesn't pass that argument down to its own clang (which is at a different version than Apple's clang, which is why it doesn't know this argument).
@jvillard
Is any progress about this issue ? I also face this error ,on M1 with the latest mac os version
You can use
--clang-block-listed-flags-with-arg -ivfsstatcache
so that infer doesn't pass that argument down to its own clang (which is at a different version than Apple's clang, which is why it doesn't know this argument).
Hi, I use this ,but still have this error , is there anything wrong about this :"infer run --keep-going --skip-analysis-in-path Pods --clang-block-listed-flags-with-arg -ivfsstatcache --clang-compilation-db-files-escaped compile_commands.json " ?
Error message is "Error message: clang-16: error: unknown argument: '-ivfsstatcache' "
Could you help check it please . Many thanks .
将-ivfsstatcache参数移除掉即可 怎么移除
将-ivfsstatcache参数移除掉即可
@songgeb 请问下你说的这个参数移除掉是什么意思?怎么操作 我后来又测试了,只有使用compile_commands.json解析这种方式才会报这个错误,infer run -- xcodebuild的方式是没有问题的。 而且就像上面说的有人测试了--clang-block-listed-flags-with-arg -ivfsstatcache,这个使用compile_commands.json解析的时候也不好用,谢谢
就是将json文件中这个参数及其value都删掉
发自我的iPhone
在 2023年8月15日,下午8:09,zhengzhiwen @.***> 写道:
将-ivfsstatcache参数移除掉即可
@songgeb 请问下你说的这个参数移除掉是什么意思?怎么操作 我后来又测试了,只有使用compile_commands.json解析这种方式才会报这个错误,infer run -- xcodebuild的方式是没有问题的。 而且就像上面说的有人测试了--clang-block-listed-flags-with-arg -ivfsstatcache,这个使用compile_commands.json解析的时候也不好用,谢谢
他的意思应该是把compile_commands.json里的ivfsstatcache删除,我试了还是会报错,我是m1的电脑
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
m1的机器上,移除ivfsstatcache参数后,还会报其他错误:
fatal error: could not build module 'Foundation'
To be honest, I strongly do not recommend use infer. It can only find some simple mistakes that most experienced engineers do not make.
将-ivfsstatcache参数移除掉即可
@songgeb 请问下你说的这个参数移除掉是什么意思?怎么操作 我后来又测试了,只有使用compile_commands.json解析这种方式才会报这个错误,infer run -- xcodebuild的方式是没有问题的。 而且就像上面说的有人测试了--clang-block-listed-flags-with-arg -ivfsstatcache,这个使用compile_commands.json解析的时候也不好用,谢谢
@pastel001 infer run -- xcodebuild 这种方式的完整命令是什么
说实话,我强烈不建议使用infer。它只能发现一些大多数有经验的工程师不会犯的简单错误。
OCLint也有问题,没有适配最新的Xcode15,也是各种报错,还有哪个好用检测工具推荐吗?太难了😂
可以使用 sed -i '' 's/-ivfsstatcache[^\"]*\.sdkstatcache//g' "/Users/**/Desktop/***/***/compile_commands.json"
先处理json文件,然后在使用infer run 去分析json文件
infer --version
Infer version v1.1.0-7fb6d4011 Copyright 2009 - present Facebook. All Rights Reserved.
Mac mini
Apple M1 Ventura 13.3
xcodebuild -version
Xcode 14.3 Build version 14E222b
command infer run --keep-going --skip-analysis-in-path Pods --compilation-database-escaped compile_commands.json
log: