[PATCH] D25777: [Sema][TreeTransform] Re-create DesignatedInitExpr when it has a field designator with a valid FieldDecl

John McCall via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 22 10:21:06 PDT 2016


rjmccall added a comment.

Thanks, LGTM with a small tweak.



================
Comment at: lib/Sema/TreeTransform.h:8928
+        FieldDecl *Field = dyn_cast_or_null<FieldDecl>(
+            getDerived().TransformDecl(D.getFieldLoc(), D.getField()));
+        if (Field != D.getField())
----------------
I'm pretty sure that TransformDecl promises to preserve the decl kind, i.e. this can be a cast_or_null.


Repository:
  rL LLVM

https://reviews.llvm.org/D25777





More information about the cfe-commits mailing list