mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 16:26:42 +00:00

Fixes rdar://43760099 Differential revision: https://reviews.llvm.org/D52271 llvm-svn: 342672
19 lines
465 B
C++
19 lines
465 B
C++
// RUN: %clang_cc1 -std=c++17 -verify %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
template <class T> struct add_restrict {
|
|
typedef T __restrict type;
|
|
};
|
|
|
|
template <class T, class V> struct is_same {
|
|
static constexpr bool value = false;
|
|
};
|
|
|
|
template <class T> struct is_same<T, T> {
|
|
static constexpr bool value = true;
|
|
};
|
|
|
|
static_assert(is_same<int & __restrict, add_restrict<int &>::type>::value, "");
|
|
static_assert(is_same<int(), add_restrict<int()>::type>::value, "");
|