[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

Zoltán Gera via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 12 06:39:42 PST 2018


gerazo added inline comments.


================
Comment at: tools/scan-build-py/libscanbuild/analyze.py:702
 
+
 # To have good results from static analyzer certain compiler options shall be
----------------
george.karpenkov wrote:
> This blank line should not be in this PR.
Scheduled to be done.


================
Comment at: tools/scan-build-py/libscanbuild/report.py:270
 
+    # Protect parsers from bogus report files coming from clang crashes
+    for filename in glob.iglob(os.path.join(output_dir, pattern)):
----------------
george.karpenkov wrote:
> I understand the intent here, but it seems it should be handled at a different level: would it be hard to change Clang to only write the report file at the very end, when no crash should be encountered? Or make parsers not choke on empty fields?
After careful investigation, I have to say, it would be very hard to tell that we've done this right in the current setup. Unlike the the rest of clang, ASTImporter.cpp is not a strong part of the system. It has a lot of ongoing fixes and probably more problems (missing CXX functionality) on the way. This is the part which makes CTU less reliable than clang generally. In order to elegantly survive a problem of this unit, we need to leave the other things intact and fix ASTImporter instead (this is an ongoing effort). Until then, this fix seems good enough.


https://reviews.llvm.org/D30691





More information about the cfe-commits mailing list