[PATCH] D109411: [clang] Enable the special enable_if_t diagnostics for libc++'s __enable_if_t as well.

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 8 08:41:23 PDT 2021


Quuxplusone updated this revision to Diff 371350.
Quuxplusone retitled this revision from "[clang] Enable the special enable_if_t diagnostics for libc++'s _EnableIf as well." to "[clang] Enable the special enable_if_t diagnostics for libc++'s __enable_if_t as well.".
Quuxplusone edited the summary of this revision.
Quuxplusone added a comment.

Okay, I think I've got it all sorted out in my head. This path forward seems reasonable to me:

> D109435 <https://reviews.llvm.org/D109435> switches us from SCARY `_EnableIf` to a normal `__enable_if_t` (at least in C++11 mode, and possibly everywhere for consistency). Simultaneously, this Clang patch enables the good diagnostics for `__enable_if_t`. We don't need to enable good diagnostics for `_EnableIf` because the name `_EnableIf` has only ever been used for the SCARY version where the good diagnostics don't trigger anyway.

Added a test case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109411

Files:
  clang/lib/Sema/SemaTemplate.cpp
  clang/test/SemaTemplate/diagnose-enable-if-t.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109411.371350.patch
Type: text/x-patch
Size: 4624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210908/b3189c85/attachment-0001.bin>


More information about the cfe-commits mailing list