https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -237,7 +237,7 @@ bool Decl::isTemplateParameterPack() const {
}
bool Decl::isParameterPack() const {
- if (const auto *Var = dyn_cast(this))
+ if (const auto *Var = dyn_cast(this))
zwuis wrote:
My idea about this part of changes is adding `BindingDecl::i
https://github.com/zwuis commented:
FYI Clang Static Analyzer (I built this branch locally) crashes when running
with 'clang/test/SemaCXX/cxx2c-binding-pack.cpp'. My test command is
`path/to/build/bin/clang-tidy --checks=clang-static-analyzer-core.BitwiseShift
another/path/to/SemaCXX/cxx2c-bin
@@ -104,7 +104,6 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
case Decl::Binding:
case Decl::UnresolvedUsingIfExists:
case Decl::HLSLBuffer:
-llvm_unreachable("Declaration should not be in declstmts!");
zwuis wrote:
Can we move some `case`s aft
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/108837
>From 7e5f88c322852939ae68c65f6adf4a5d2973d095 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Mon, 16 Sep 2024 21:50:11 +0800
Subject: [PATCH 1/4] Fix computing result type of conditional operand
---
clang/docs
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/108837
>From 7e5f88c322852939ae68c65f6adf4a5d2973d095 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Mon, 16 Sep 2024 21:50:11 +0800
Subject: [PATCH 1/3] Fix computing result type of conditional operand
---
clang/docs
zwuis wrote:
> I'm also concerned about the constexpr support being 'FIXME', it seems that
> this should just 'work' unless something odd is happening.
Sorry I forgot the restriction of constexpr function in C++11. Fixed.
https://github.com/llvm/llvm-project/pull/108837
___
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
-fexperimental-new-constant-interpreter
zwuis wrote:
> Should run with BOTH constexpr interpreters.
Sorry I don't understand the mea
@@ -8785,14 +8785,11 @@ ExprResult Sema::ActOnConditionalOp(SourceLocation
QuestionLoc,
commonExpr = result.get();
}
// We usually want to apply unary conversions *before* saving, except
-// in the special case of a C++ l-value conditional.
-if (!(getLang
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/108837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
zwuis wrote:
> I think this test should go in `clang/test/Sema/conditional-expr.c` and we
> should add a section of the GNU extension there.
>
> I am also a bit concerned that we don't hav
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/108837
>From 7e5f88c322852939ae68c65f6adf4a5d2973d095 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Mon, 16 Sep 2024 21:50:11 +0800
Subject: [PATCH 1/3] Fix computing result type of conditional operand
---
clang/docs
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/108837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/108837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/108837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zwuis wrote:
Do we need a test case about explicit object member function? i.e.
```cpp
template int get(this triple);
template<> int get<0>(this triple t) { return /* ... */; }
```
https://github.com/llvm/llvm-project/pull/122265
___
cfe-commits mailin
@@ -365,3 +365,9 @@ void test19(long long x)
// FIXME: This case should be supported by codegen, but it fails now.
asm ("" : "=rm" (x): "0" (e)); // expected-error {{unsupported inline asm:
input with type 'st_size128' (aka 'struct _st_size128') matching output with
type '
@@ -365,3 +365,9 @@ void test19(long long x)
// FIXME: This case should be supported by codegen, but it fails now.
asm ("" : "=rm" (x): "0" (e)); // expected-error {{unsupported inline asm:
input with type 'st_size128' (aka 'struct _st_size128') matching output with
type '
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning<
"to compare array addresses, use unary '+' to decay operands to pointers">,
InGroup>;
+def warn_array_comparison_cxx26 : Warning<
+ "comparison between two arrays compare their addresses not their contents; "
-
@@ -239,7 +239,7 @@ C++2c implementation status
Remove Deprecated Array Comparisons from C++26
https://wg21.link/P2865R6";>P2865R6
- No
+ Clang 20
zwuis wrote:
```suggestion
Clang 20
```
https://github.com/llvm/llvm-project/pull/118872
@@ -1619,8 +1619,9 @@ std::pair
CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const {
// If the callee is marked nodiscard, return that attribute
const Decl *D = getCalleeDecl();
- if (const auto *A = D->getAttr())
-return {nullptr, A};
+ if (D != nullptr)
https://github.com/zwuis approved this pull request.
https://github.com/llvm/llvm-project/pull/118003
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3599,7 +3599,7 @@ C++ defect report implementation
status
https://cplusplus.github.io/CWG/issues/591.html";>591
CD4
When a dependent base class is the current instantiation
-No
+Yes
zwuis wrote:
```suggestion
Clang 20
```
https:/
@@ -1178,17 +1178,61 @@ namespace cwg590 { // cwg590: yes
template typename A::B::C A::B::C::f(A::B::C) {}
}
-namespace cwg591 { // cwg591: no
+namespace cwg591 { // cwg591: yes
zwuis wrote:
```suggestion
namespace cwg591 { // cwg591: 20
```
https://githu
@@ -1639,6 +1639,13 @@ SourceLocation CallExpr::getBeginLoc() const {
if (const auto *OCE = dyn_cast(this))
return OCE->getBeginLoc();
+ if (const CXXMethodDecl *Method =
+ dyn_cast_or_null(getCalleeDecl());
zwuis wrote:
```suggestion
zwuis wrote:
I think we should make these changes to all backported features.
https://github.com/llvm/llvm-project/pull/114713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -471,8 +471,9 @@ class Type {
static Type *getWasm_FuncrefTy(LLVMContext &C);
/// Return a pointer to the current type. This is equivalent to
- /// PointerType::get(Foo, AddrSpace).
+ /// PointerType::get(Ctx, AddrSpace).
/// TODO: Remove this after opaque pointer
@@ -79,8 +79,24 @@ enum class StringLiteralKind;
// AST classes for statements.
//===--===//
-/// Stmt - This represents one statement.
+/// A statement or expression in the program.
///
+/// This is the bas
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/108837
>From 7e5f88c322852939ae68c65f6adf4a5d2973d095 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Mon, 16 Sep 2024 21:50:11 +0800
Subject: [PATCH 1/2] Fix computing result type of conditional operand
---
clang/docs
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/108837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis created
https://github.com/llvm/llvm-project/pull/108837
According to [[expr.cond]/5](https://eel.is/c++draft/expr.cond#5) and
[[expr.cond]/7.1](https://eel.is/c++draft/expr.cond#7.1), no conversion should
be performed to compute result type if middle operand and right
@@ -0,0 +1,35 @@
+const char8_t x = 1;
+
+template requires true
+const int y = requires { typename T::type; requires T::value; };
+
+int f(){ co_await 1; }
+
+// RUN: %clang_cc1 -std=c++20 -code-completion-at=%s:1:3 %s | FileCheck
--check-prefix=CHECK-TOP-LEVEL %s
+// CHECK-TOP-
zwuis wrote:
Suggestions are applied. Thank you for your review!
I don't have commit accees. Please help me merge this PR if it's ready.
https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/102581
>From 9d5d8d99db6f7fa0b6973fe55582de9d34740b19 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Fri, 9 Aug 2024 15:45:40 +0800
Subject: [PATCH 1/5] Support non-reference structured bindings with braced
array as in
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/102581
>From 9d5d8d99db6f7fa0b6973fe55582de9d34740b19 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Fri, 9 Aug 2024 15:45:40 +0800
Subject: [PATCH 1/5] Support non-reference structured bindings with braced
array as in
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager
&SourceMgr,
return false;
}
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
+ const LangOptions &Lang = PP.getLangOpts();
+ const StringRef Name = II->getName();
+
+ if
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/106036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager
&SourceMgr,
return false;
}
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
+ const LangOptions &Lang = PP.getLangOpts();
+ const StringRef Name = II->getName();
+
+ if
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/102581
>From 9d5d8d99db6f7fa0b6973fe55582de9d34740b19 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Fri, 9 Aug 2024 15:45:40 +0800
Subject: [PATCH 1/3] Support non-reference structured bindings with braced
array as in
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/102581
>From 9d5d8d99db6f7fa0b6973fe55582de9d34740b19 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Fri, 9 Aug 2024 15:45:40 +0800
Subject: [PATCH 1/2] Support non-reference structured bindings with braced
array as in
https://github.com/zwuis updated
https://github.com/llvm/llvm-project/pull/102581
>From 9d5d8d99db6f7fa0b6973fe55582de9d34740b19 Mon Sep 17 00:00:00 2001
From: Yanzuo Liu
Date: Fri, 9 Aug 2024 15:45:40 +0800
Subject: [PATCH 1/2] Support non-reference structured bindings with braced
array as in
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/102581
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -74,16 +75,31 @@ class formatv_object_base {
static std::pair
splitLiteralAndReplacement(StringRef Fmt);
- formatv_object_base(StringRef Fmt,
+ formatv_object_base(StringRef Fmt, bool ValidateNumArgs,
ArrayRef Adapters)
- : Fmt(Fmt), Adapte
zwuis wrote:
CC @shafik
https://github.com/llvm/llvm-project/pull/102878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/103046
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -54,4 +54,18 @@ struct B {
void operator delete(void*) volatile; //expected-error {{static member
function cannot have 'volatile' qualifier}}
void operator delete[](void*) volatile; //expected-error {{static member
function cannot have 'volatile' qualifier}}
};
+
+stru
@@ -712,22 +712,30 @@ bool Sema::addInstantiatedCapturesToScope(
auto AddSingleCapture = [&](const ValueDecl *CapturedPattern,
unsigned Index) {
ValueDecl *CapturedVar = LambdaClass->getCapture(Index)->getCapturedVar();
-if (CapturedVar->
https://github.com/zwuis created
https://github.com/llvm/llvm-project/pull/102581
When initializing non-reference structured bindings from braced array, array
copy will be performed, which is a special case not following
list-initialization.
This PR adds support for this case.
Fixes #31813.
zwuis wrote:
> I don’t believe the standard supports anonymous structs in C++
Do we need tests about anonymous union? C++ standard supports it.
https://github.com/llvm/llvm-project/pull/100525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
zwuis wrote:
Thank you for your review!
I don't have commit access. Please help me merge this PR if it's ready.
https://github.com/llvm/llvm-project/pull/100525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/100525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/100525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis created
https://github.com/llvm/llvm-project/pull/100525
There is a `IDNS_Ordinary` flag in `IndirectField::IdentifierNamespace` so that
members in nested anonymous struct/union can be found as ordinary identifiers.
```c
struct S {
struct { int x; };
// Previous be
59 matches
Mail list logo