[clang] [Draft] Summary Based Analysis Prototype (PR #144224)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 17:52:58 PDT 2025
================
@@ -611,6 +623,29 @@ class CompilerInstance : public ModuleLoader {
/// the compiler instance takes ownership of \p Value.
void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
+ /// @}
+ /// @name Summary
+ /// @{
+
+ bool hasSummaryContext() { return (bool)SummaryCtx; }
+
+ SummaryContext &getSummaryContext() {
+ assert(SummaryCtx && "Compiler instance has no summary context!");
+ return *SummaryCtx;
+ }
+
+ void createSummaryContext() { SummaryCtx.reset(new SummaryContext()); }
----------------
isuckatcs wrote:
I'm not sure tbh. I just mirrored what other create functions such as `CompilerInstance::createSema()` do. Those don't assert the existence, so maybe the consumers of the class expect this kind of behaviour.
https://github.com/llvm/llvm-project/pull/144224
More information about the cfe-commits
mailing list