https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/81398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/81398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,6 +33,7 @@ namespace clang {
class Decl;
struct DeducedPack;
class Sema;
+enum class TemplateDeductionResult;
erichkeane wrote:
Ok then, I'm ok sticking to our existing practice if this is a policy that was
already made.
https://github.com/llvm/llvm-p
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl
*Found, Decl *Templated,
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast());
- switch (DeductionFailure.Result) {
- case Sema::TDK_Success:
-llvm_un
@@ -33,6 +33,7 @@ namespace clang {
class Decl;
struct DeducedPack;
class Sema;
+enum class TemplateDeductionResult;
Endilll wrote:
This is far from the first time we do unscoped enum → scoped enum refactoring
so that we can forward declare enums. Me and @Aar
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl
*Found, Decl *Templated,
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast());
- switch (DeductionFailure.Result) {
- case Sema::TDK_Success:
-llvm_un
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 6a7cf806a66c67df01818fda01116a2dd2d90b0d
4111afb81d798f9d8141adc634e617c34b5a --
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl
*Found, Decl *Templated,
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast());
- switch (DeductionFailure.Result) {
- case Sema::TDK_Success:
-llvm_un
@@ -33,6 +33,7 @@ namespace clang {
class Decl;
struct DeducedPack;
class Sema;
+enum class TemplateDeductionResult;
erichkeane wrote:
should we specify the underlying type in all of these? I wonder if we can just
specify it as `uint8_t`? Would mean not hav
https://github.com/Endilll commented:
Since this patch is rather large, I left two comments highlighting potentially
interesting parts of it.
https://github.com/llvm/llvm-project/pull/81398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl
*Found, Decl *Templated,
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast()) ||
(ParamD = Param.dyn_cast());
- switch (DeductionFailure.Result) {
- case Sema::TDK_Success:
-llvm_un
@@ -295,6 +297,10 @@ struct DeductionFailureInfo {
/// Free any memory associated with this deduction failure.
void Destroy();
+
+ TemplateDeductionResult getResult() const {
+return static_cast(Result);
Endilll wrote:
@erichkeane This is also worth
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/81398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
Changes
This patch converts `Sema::TemplateDeductionResult` into a scoped enum in
namespace scope, making it eligible for forward declaring. This is useful in
certain contexts, such as `preferred_type` annotat
14 matches
Mail list logo