[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

Ella Ma via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 5 23:40:39 PDT 2021


OikawaKirie updated this revision to Diff 343293.
OikawaKirie added a comment.

Add a regression test case by mocking the `open` function. When this function is called with the file name of the invocation list, the mocked `open` function will reject the open operation and dump a log. And we will then check how many times are the invocation list opened. (Thanks to the ideas by steakhal in another patch of mocking a library function :-).)

Identifiers renamed as suggested.

Unfortunately, we cannot store and copy a `llvm::Error` object. Therefore, the new version still uses the error code to store the previous parsing results.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101763/new/

https://reviews.llvm.org/D101763

Files:
  clang/include/clang/CrossTU/CrossTranslationUnit.h
  clang/lib/CrossTU/CrossTranslationUnit.cpp
  clang/test/Analysis/multiple-invocation-list-parsing.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101763.343293.patch
Type: text/x-patch
Size: 4689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210506/a543a9f0/attachment-0001.bin>


More information about the cfe-commits mailing list