-
Notifications
You must be signed in to change notification settings - Fork 339
[clang][Modules] Adding C-API for Negative Stat Caching Diagnostics #10524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
Note to reviewers: Thanks! |
clang/include/clang-c/Dependencies.h
Outdated
@@ -585,6 +585,11 @@ const char *clang_experimental_DepGraph_getTUContextHash(CXDepGraph); | |||
CINDEX_LINKAGE | |||
CXDiagnosticSet clang_experimental_DepGraph_getDiagnostics(CXDepGraph); | |||
|
|||
CINDEX_LINKAGE | |||
CXStringSet * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only now do I see that we use CXCStringArray
everywhere in the scanner API. This means that introducing new CXStringSet
type will impose additional burden on the client. Unlike upstream, we already have factory functions that create reference-like CXCStringArray
here in the next
branch. Can we switch to that type instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! The code is updated. Thanks for taking a careful look.
I don't particularly like the code I have for createCStringsRefImpl
. It feels clumsy. I have to have the lambda to handle the simple task of getting the start of the string data. I am all ears if there are simpler ways to do this.
llvm#135703 added a C++ API to the shared cached to diagnose invalid negatively stat cached paths. This PR adds a C API so an external system can take advantage of the diagnostics.