Any tips for speeding up static analysis tool PC-Lint? Any experiences using .LOB files?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 10:11:51

The main speedup I got was when I started redirecting Lint's sometimes massive output to a file in stead of a regular DOS box on Windows, and then look at the file in an editor. The -passes option does almost linearly increase the time if the number of passes gets high enough, but not quite when using 2 or 3, since a pre-pocessing/parsing stage is not needed except for the first pass. I my experience, for really large projects, external include guards, or (Microsoft) the option +pragma(once,once) - if #pragma once is consistently used - may result in enormous speed increases. In one project I dropped compile times by a factor of more than 20, and linting times just a little less...

Using .lob files is like compiling to objects and then linking objects: It depends on how effective your makefile is, and the speed increase depends on how many and which files you have just changed. Be aware, though, that using .lob files is not as thorough as linting all files in one go; some issues have to be ignored, because the .lob files contain only a representation of the source files.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!