aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM, thank you for catching this! ================ Comment at: clang/lib/Sema/SemaDecl.cpp:3914-3918 + if (Old->hasInheritedPrototype()) + Old = Old->getCanonicalDecl(); Diag(New->getLocation(), diag::err_conflicting_types) << New; Diag(Old->getLocation(), PrevDiag) << Old << Old->getType(); return true; ---------------- I don't think it's safe to assign this new value to `Old` as that object is what we eventually merge the declaration with (so we'll get the decl chain order wrong, I believe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126258/new/ https://reviews.llvm.org/D126258 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits