This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add ASTContext to CheckerManager
ClosedPublic

Authored by george.karpenkov on Jul 31 2018, 3:09 PM.

Details

Summary

Some checkers require ASTContext. Having it in the constructor saves a lot of boilerplate of having to pass it around.

Diff Detail

Repository
rC Clang

Event Timeline

george.karpenkov retitled this revision from Add ASTContext to CheckerManager to [analyzer] Add ASTContext to CheckerManager.
NoQ added inline comments.Aug 1 2018, 7:08 PM
clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
299 ↗(On Diff #158400)

I'm pretty sure PP.getLangOpts() would be the same as Context.getLangOpts(), so there's no need to pass them separately: they can be obtained from the context within the constructor.

george.karpenkov marked an inline comment as done.
NoQ accepted this revision.Aug 6 2018, 3:52 PM
This revision is now accepted and ready to land.Aug 6 2018, 3:52 PM
This revision was automatically updated to reflect the committed changes.