[PATCH] D129170: [Sema] Add deprecation warnings for some compiler provided __has_* type traits

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 6 13:55:36 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5400-5401
+                                            SourceLocation KWLoc) {
+  if (!S.getLangOpts().CPlusPlus11)
+    return;
+
----------------
royjacobson wrote:
> aaron.ballman wrote:
> > I think we should always warn on these, not just in C++11.
> I'm not convinced we should. My reasoning is that we need a pretty good reason to start issuing warnings for 20 years old code. The usage of those builtins with deleted functions after C++11 is pretty broken which is a pretty good reason, but for earlier language versions they work 'fine' and if people want to use C++03 I prefer leaving them at peace :)
> 
> People on C++03 are also probably using pretty old versions of libstdc++ and/or boost type_traits, so this could have some impact.
> 
> WDYT?
> 
warnings don't get emitted for code in header files, so at least that part isn't a concern.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129170



More information about the cfe-commits mailing list