[PATCH] D80961: Ignore template instantiations if not in AsIs mode

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 21 04:45:34 PDT 2020


steveire added a comment.

Here's another example where it is not appropriate to transform a template instantiation:

http://clang-developers.42468.n3.nabble.com/Questions-discussions-about-cast-types-in-clang-td4068626.html

"If we call foo<int>, it can be a const_cast, but if we call foo<double>, it has to be a reinterpret_cast. In a situation where the user is writing library code, it won't only be relevant to the current translation unit but also for future purposes. Therefore, I propose that we leave dependent type c-style casts as they are."

Just recording it as part of the motivation of this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80961/new/

https://reviews.llvm.org/D80961





More information about the cfe-commits mailing list