[PATCH] D49772: [analyzer] [NFC] Simplify some visitors by giving a convenient getter from state to analysis manager

Artem Dergachev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 30 15:55:37 PDT 2018


NoQ added inline comments.


================
Comment at: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:739
     // See if the return value is NULL. If so, suppress the report.
-    SubEngine *Eng = State->getStateManager().getOwningEngine();
-    assert(Eng && "Cannot file a bug report without an owning engine");
-    AnalyzerOptions &Options = Eng->getAnalysisManager().options;
+    AnalyzerOptions &Options = State->getAnalysisManager().options;
 
----------------
Btw why isn't this field private? I guess nobody cares because it's anyway exposed as a mutable reference, but we might have as well had consistency.


Repository:
  rL LLVM

https://reviews.llvm.org/D49772





More information about the llvm-commits mailing list