efriedma added a comment. The `VD->getAnyInitializer()->IgnoreCasts()` is the part that's wrong. We want to allow something like the following:
constexpr int *q = (int *)(int[1]){3}; constexpr int *q2 = q; To catch the bad cases specifically, we have to wait until we actually reach the compound literal. See line 4262, or something like that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124038/new/ https://reviews.llvm.org/D124038 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits