[PATCH] Recover from missing 'typename' in sizeof(T::InnerType)

Richard Smith richard at metafoo.co.uk
Thu Jun 12 15:34:51 PDT 2014


Looks good.

================
Comment at: lib/Sema/TreeTransform.h:6871
@@ +6870,3 @@
+      PE ? dyn_cast<DependentScopeDeclRefExpr>(PE->getSubExpr()) : nullptr;
+  if (PE && DRE)
+    SubExpr = getDerived().TransformParenDependentScopeDeclRefExpr(
----------------
It's sufficient to only test `DRE` here (you could also move the declaration of `DRE` into the `if`).

================
Comment at: lib/Sema/TreeTransform.h:8282
@@ -8240,3 +8281,3 @@
                                                DependentScopeDeclRefExpr *E) {
-  return TransformDependentScopeDeclRefExpr(E, /*IsAddressOfOperand*/false);
+  return TransformDependentScopeDeclRefExpr(E, /*IsAddressOfOperand*/false, nullptr);
 }
----------------
My over-80-column sense is tingling...

http://reviews.llvm.org/D4108






More information about the cfe-commits mailing list