https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/78103
>From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 14 Jan 2024 19:45:04 +0300
Subject: [PATCH 1/6] [clang] Implement CWG1878 "`operator auto` template"
C+
@@ -11321,9 +11321,20 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
https://github.com/cor3ntin approved this pull request.
LGTM, thanks
Feel free to refactor `err_auto_not_allowed` in a separate PR
https://github.com/llvm/llvm-project/pull/78103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/78103
>From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 14 Jan 2024 19:45:04 +0300
Subject: [PATCH 1/5] [clang] Implement CWG1878 "`operator auto` template"
C+
@@ -11322,9 +11322,22 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in
function prototype}}
}
}
+
+struct DeducedTargetTypeOfConversionFunction {
+ operator auto() const { return char(); }
+ operator const auto() const { return float(); }
Endilll wrot
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/78103
>From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 14 Jan 2024 19:45:04 +0300
Subject: [PATCH 1/4] [clang] Implement CWG1878 "`operator auto` template"
C+
@@ -11322,9 +11322,22 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
@@ -11322,9 +11322,22 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/78103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/78103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11322,9 +11322,22 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
@@ -11322,9 +11322,22 @@ Decl
*Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
<< ClassType << ConvType;
}
- if (FunctionTemplateDecl *ConversionTemplate
-= Conversion->getDescribedFunctionTemplate())
+ if (FunctionTe
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in
function prototype}}
}
}
+
+struct DeducedTargetTypeOfConversionFunction {
+ operator auto() const { return char(); }
+ operator const auto() const { return float(); }
cor3ntin wro
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/78103
>From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 14 Jan 2024 19:45:04 +0300
Subject: [PATCH 1/2] [clang] Implement CWG1878 "`operator auto` template"
C+
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff fb2cc9b9fc5ae5a544e3009ae153f5ae83c5a89c
522c7dff31a6f63995877674f9f4282ae60f7aaa --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
C++14 introduced deduced return type for regular functions, but shortly after
[CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced
return types in conversion function templat
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/78103
C++14 introduced deduced return type for regular functions, but shortly after
[CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced
return types in conversion function templates. So thi
18 matches
Mail list logo