freebsd-dev/contrib
Dimitry Andric 4378cc5cfb Reapply: <type_traits>: Avoid instantiating a pointer type in std::decay<>
GCC expands the pointer type in this conditional expression even for
  template types _Up that are not arrays.  This raises an error when
  std::decay<> is used with reference types (as is done in LLVM's
  sources).  Using add_pointer<> causes GCC to only instantiate a
  pointer type for array types.

  A similar change to this commit (albeit reworked due to upstream
  changes) has been merged to libc++ in commit
  26068c6e60324ed866a1ca2afb5cb5eb0aaf015b.

  In file included from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/ordering.h:13,
                   from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/common_comparison_category.h:12,
                   from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/tuple:168,
                   from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:20,
                   from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMap.h:17,
                   from /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:36:
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits: In instantiation of 'struct std::__1::__decay<llvm::CHIArg&, true>':
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1591:89:   required from 'struct std::__1::decay<llvm::CHIArg&&>'
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__utility/pair.h:132:16:   required by substitution of 'template<class _Tuple, typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> > constexpr std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::pair(_Tuple&&) [with _Tuple = llvm::CHIArg&&; typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> = <missing>]'
  /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:892:51:   required from here
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1582:30: error: forming pointer to reference type 'std::__1::remove_extent<llvm::CHIArg&>::type' {aka 'llvm::CHIArg&'}
   1582 |                      >::type type;
        |                              ^~~~

  Reviewed by:    dim
  Differential Revision:  https://reviews.freebsd.org/D36898

This reapplies commit c36de97088, which I
accidentally overwrote in the llvm 15 merge. (It turns out upstream did
not merge this to their 15.x branch.)

MFC after:	2 weeks
2023-02-09 17:28:32 +01:00
..
arm-optimized-routines Import the updated Arm Optimized Routines 2022-09-06 17:20:29 +01:00
atf Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542 2021-09-10 17:08:42 -06:00
bc contrib/bc: uodate to version 6.2.4 2023-02-06 22:33:56 +01:00
bearssl Merge bearssl-20220418 2022-04-18 14:52:30 -07:00
bionic-x86_64-string Import bionic's x86_64 optimized string routines 2022-08-16 13:27:11 -04:00
blacklist blacklistd: diff reduction against upstream 2023-01-23 11:22:10 -05:00
bmake Merge/update to bmake-20230126 2023-01-27 16:33:01 -08:00
bsddialog contrib/bsddialog: Import version 0.4 2022-09-25 15:09:16 +02:00
bsnmp Follow the standard object definition from RFC2578 2022-12-29 22:02:27 +02:00
byacc Revert "wpa: Import wpa 2.10." 2022-01-18 08:10:33 -08:00
bzip2 Remove FREEBSD-vendor files 2021-12-06 16:36:44 -05:00
capsicum-test Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb 2022-09-13 13:42:46 -04:00
com_err
cortex-strings
dialog dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
diff gnu diff3: apply patch to committed src, rather than at build time 2022-11-13 21:33:40 -05:00
dma dma: restore addition of newline when missing from input 2022-10-12 11:59:01 -04:00
ee ee: restore the stdin/stdout terminal check 2021-04-12 00:48:45 +03:00
elftoolchain libdwarf: Add some constants from DWARF 5 2023-02-07 15:10:24 -05:00
expat MFV: expat 2.5.0 2022-11-17 22:15:00 -08:00
file MFV: Restore the ability to process files from stdin immediately. 2022-10-27 00:12:53 -07:00
flex contrib/flex: Drop local __dead2 patch 2021-04-21 10:54:59 +01:00
gdtoa
googletest
hyperv/tools
jemalloc jemalloc: Define SWAP_RESERVE_* if not provided by the system headers 2022-09-17 01:35:35 +03:00
kyua
ldns
ldns-host
less MFV: less v608 2022-09-05 22:52:39 -07:00
lib9p lib9p: Remove potential buffer overwrite in l9p_puqids() 2022-08-08 12:50:43 -04:00
libarchive libarchive: merge from vendor branch 2022-12-13 20:21:13 +01:00
libbegemot
libc-pwcache
libc-vis vis(3): avoid out-of-bounds stack buffer reads 2021-06-16 16:27:13 +01:00
libcbor Import libcbor at 'contrib/libcbor/' 2021-10-06 20:26:10 -04:00
libcxxrt Merge libcxxrt commit 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd 2022-08-08 12:50:48 -04:00
libdivsufsort
libedit libedit: update to snapshot 2023-01-06 2023-02-06 14:25:06 +01:00
libevent
libexecinfo
libfido2 libfido2: Address CHERI compatibility 2021-10-06 21:40:26 -04:00
libpcap
libucl Fix build post a040967612. 2021-03-22 08:42:18 -07:00
libxo Merge commit '7087c8de43b0d5d27c52da6ba2ba4957b7e336ff' into new_merge 2023-01-30 00:04:21 -05:00
llvm-project Reapply: <type_traits>: Avoid instantiating a pointer type in std::decay<> 2023-02-09 17:28:32 +01:00
lua lua: Update to 5.4.4 2023-02-08 10:33:26 -07:00
lutok
mandoc mandoc: workaround lack of macro parsing in list -width 2022-05-31 10:06:46 -05:00
mknod
mtree
ncurses ncurses: Apply a tputs() fix from patch 20210403 2021-08-11 13:08:23 -04:00
netbsd-tests libc: Add tests for strchrnul(3). 2023-02-02 15:45:45 +01:00
netcat netcat: Allow nc to be an if_tun tunnel broker 2023-01-17 10:05:49 +00:00
ngatm
ntp ntp: Revert "Disable ntpd stack gap. When ASLR with STACK GAP != 0 ntpd suffers SIGSEGV." 2021-10-15 16:06:26 -07:00
nvi Allow building usr.bin/vi with MK_ASAN 2021-07-19 15:04:19 +01:00
ofed irdma(4): Add code for compilation on stable/13 branch 2023-02-06 14:37:39 -08:00
one-true-awk Awk: Add error file 2021-11-06 16:24:36 -06:00
openbsm OpenBSM: fix free() in au_read_rec error case 2022-10-24 09:49:30 -04:00
opencsd/decoder
openpam
openresolv
pam_modules/pam_passwdqc
pf ftp-proxy: Revert incorrect migration to libpfctl 2021-07-01 21:34:40 +02:00
pjdfstest
pnglite
pnpinfo
processor-trace
sendmail Note upgrade to sendmail 8.17.1 2023-02-01 02:22:39 +00:00
smbfs
sqlite3 sqlite3: Vendor import of sqlite3 3.40.1 2023-01-06 09:11:41 -08:00
tcp_wrappers tcp_wrappers: remove duplicate errno declarations 2022-02-23 16:26:14 +01:00
tcpdump pf: Introduce ridentifier 2021-11-05 09:39:56 +01:00
tcsh tcsh: update to version 6.22.04. 2021-05-20 00:12:27 +03:00
telnet Remove telnetd sources 2022-10-05 17:27:14 +01:00
terminus contrib/terminus: update to terminus-font-4.49.1 2022-02-02 15:42:18 +02:00
tnftp
traceroute
tzcode tzcode: Document zic's -D option. 2023-01-25 18:02:55 +01:00
tzdata contrib/tzdata: import tzdata 2022g 2022-11-30 09:36:28 +08:00
unbound unbound: Vendor import 1.17.1 2023-01-14 21:39:31 -08:00
unvis
vis Merge tag 'vendor/NetBSD/vis/20210621' into vis 2021-06-21 18:04:17 -06:00
wireguard-tools Merge commit '93bf91b4012a28610672d2266366dfa0a663b70f' into HEAD 2022-11-04 22:46:21 -05:00
wpa wpa_supplicant: Resolve secondary VAP association issue 2022-07-03 14:19:38 -07:00
xz MFV: xz 5.4.1. 2023-01-22 16:50:36 -08:00