cishida added inline comments.
================ 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; ---------------- aaron.ballman wrote: > 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). Ah, I hadn't realized we still can merge decls together in a fatal error case. 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