[PATCH] D72565: adding __has_feature support for left c++ type_traits

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 12 10:34:12 PST 2020


rsmith requested changes to this revision.
rsmith added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/include/clang/Basic/Features.def:191-192
 // Type traits
 // N.B. Additional type traits should not be added to the following list.
 // Instead, they should be detected by has_builtin.
 FEATURE(has_nothrow_assign, LangOpts.CPlusPlus)
----------------
Please see this comment. `__has_builtin` should be used to detect these type traits, per the documentation (https://clang.llvm.org/docs/LanguageExtensions.html#type-trait-primitives and https://clang.llvm.org/docs/LanguageExtensions.html#has-builtin), and already works for this purpose.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72565





More information about the llvm-commits mailing list