sfantao added a comment. Hi Alexey,
Thanks for the review! ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:4692-4694 @@ +4691,5 @@ + llvm::Value *ElemSize; + if (auto *PTy = BaseTy->getAs<PointerType>()) { + ElemSize = CGF.getTypeSize(PTy->getPointeeType().getCanonicalType()); + } else { + auto *ATy = cast<ArrayType>(BaseTy.getTypePtr()); ---------------- Done! ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5086 @@ +5085,3 @@ + ? nullptr + : cast<ValueDecl>(Cap->getCapturedVar()->getCanonicalDecl()); + ---------------- ABataev wrote: > cast is not required, remove it It does not work without the cast because the base class Decl returns a Decl*. Even if the overrides in the child classes use the child type, the base class is what is used for implicit cast checking. http://reviews.llvm.org/D16749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits