chrish_ericsson_atx added a comment. In D104285#2823305 <https://reviews.llvm.org/D104285#2823305>, @chrish_ericsson_atx wrote:
> I'm not sure about whether or not this patch would only work for constant > arrays with initializer lists. If it does only work for such arrays, then I > wonder whether the fix is broad enough -- I haven't tested (yet), but I think > the presence of the initializer list in the test case is not necessary to > trigger the spurious warnings about garbage/undefined values. I'll try it > tomorrow morning... I tested with an unpatched build using a reproducer without an initializer list, and didn't get the spurious warnings -- so your approach seems correct to me now. I've also tested your patch and I believe it gives correct behavior. ================ Comment at: clang/lib/AST/Type.cpp:149 + Extents.push_back(*CAT->getSize().getRawData()); + } while (CAT = dyn_cast<ConstantArrayType>(CAT->getElementType())); + return Extents; ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104285/new/ https://reviews.llvm.org/D104285 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits