tinnamchoi wrote:
@Sirraide The other PR got merged, this should be good upon green CI rerun
https://github.com/llvm/llvm-project/pull/152865
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
@@ -10742,9 +10742,53 @@ static void DiagnoseBadDivideOrRemainderValues(Sema&
S, ExprResult &LHS,
<< IsDiv << RHS.get()->getSourceRange());
}
+static void diagnoseScopedEnums(Sema &S, const SourceLocation Loc,
+const
@@ -13,6 +13,7 @@ enum class E { e };
template int f(T t) { return ~t; } // expected-error {{invalid
argument type}}
template int f(T t, U u) { return t % u; } //
expected-error {{invalid operands to}}
+ //
e
tinnamchoi wrote:
Agreed, let's wait for that then.
https://github.com/llvm/llvm-project/pull/152865
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tinnamchoi wrote:
I prefer keeping my PRs atomic. All of my changes in that PR are necessary
towards the primary goal of that PR, whereas this change wouldn't be. If I
allowed myself to make refactors whenever I'm working on a feature it would
introduce quite a bit of noise, which seems like a
tinnamchoi wrote:
What would the tests in C look like? Scoped enums don't exist in C.
Other than that, the tests to be introduced in #152698 should cover this,
running locally seems fine.
https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3abfb3d4d4eda676ab6ce30890/clang/test/SemaCXX/enum
tinnamchoi wrote:
The tests to be introduced in #152698 should cover this, running them locally
seems fine.
https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3abfb3d4d4eda676ab6ce30890/clang/test/SemaCXX/enum-scoped.cpp#L439-L452
https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3a
https://github.com/tinnamchoi created
https://github.com/llvm/llvm-project/pull/152865
This check, introduced in 0bf3140424a0a13a928a4e6bf0f112e6167a5636, has not
been necessary since 21673c4e7ec08457b53798b9879b7cc9a5909eb8
https://github.com/llvm/llvm-project/blob/0bf3140424a0a13a928a4e6bf0f
https://github.com/tinnamchoi updated
https://github.com/llvm/llvm-project/pull/152698
>From 214a9541d4becd3dfae00cc33be5d35228455089 Mon Sep 17 00:00:00 2001
From: tinnamchoi
Date: Fri, 8 Aug 2025 14:39:50 +0800
Subject: [PATCH 1/9] [Clang] Add diagnostic when scoped enumeration requires
an e
https://github.com/tinnamchoi updated
https://github.com/llvm/llvm-project/pull/152698
>From 214a9541d4becd3dfae00cc33be5d35228455089 Mon Sep 17 00:00:00 2001
From: tinnamchoi
Date: Fri, 8 Aug 2025 14:39:50 +0800
Subject: [PATCH 1/8] [Clang] Add diagnostic when scoped enumeration requires
an e
@@ -10772,9 +10811,14 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult
&LHS, ExprResult &RHS,
if (LHS.isInvalid() || RHS.isInvalid())
return QualType();
-
- if (compType.isNull() || !compType->isArithmeticType())
-return InvalidOperands(Loc, LHS, RHS);
+ i
https://github.com/tinnamchoi edited
https://github.com/llvm/llvm-project/pull/152698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tinnamchoi edited
https://github.com/llvm/llvm-project/pull/152698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tinnamchoi created
https://github.com/llvm/llvm-project/pull/152698
Fixes #24265
>From 214a9541d4becd3dfae00cc33be5d35228455089 Mon Sep 17 00:00:00 2001
From: tinnamchoi
Date: Fri, 8 Aug 2025 14:39:50 +0800
Subject: [PATCH 1/3] [Clang] Add diagnostic when scoped enumeration
14 matches
Mail list logo