[PATCH] D29003: [OptDiag] Move everything but code region into a new base class for DiagnosticInfoOptimizationBase

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 16:52:29 PST 2017


anemet marked an inline comment as not done.
anemet added inline comments.


================
Comment at: lib/Analysis/OptimizationDiagnosticInfo.cpp:157
   if (Out) {
-    auto *P = &const_cast<DiagnosticInfoOptimizationBase &>(OptDiag);
+    auto *P =
+        const_cast<DiagnosticInfoOptimizationCommonBase *>(&OptDiagCommon);
----------------
MatzeB wrote:
> dito.
Actually, this one needs to be a pointer because << requires an lvalue so we can't pass a temporary (&P).


https://reviews.llvm.org/D29003





More information about the llvm-commits mailing list