================
@@ -0,0 +1,184 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify 
-std=c++17 %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify 
-std=c++20 %s
+
+#if !__has_builtin(__builtin_common_type)
+#  error
+#endif
+
+// expected-note@*:* {{template declaration from hidden source: template 
<template <class ...> class, template <class> class, class, class ...>}}
+
+void test() {
+  __builtin_common_type<> a; // expected-error {{too few template arguments 
for template '__builtin_common_type'}}
----------------
AaronBallman wrote:

Other test cases to consider:
```
__builtin_common_type<1> a;
__builtin_common_type<int, 1> b;
```

https://github.com/llvm/llvm-project/pull/99473
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to