[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/88646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88646 >From 34d735b2f85e3c24cbf725f6a519afec6c916820 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Apr 2024 10:41:53 +0300 Subject: [PATCH] [clang][NFC] Factor out VLA check in type traits ---

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -5012,6 +5012,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, return From; } +/// Checks that type T is not a VLA. +/// +/// @returns @c true if @p T is VLA and a diagnostic was emitted, +/// @c false otherwise. +static bool

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I intentionally split formatting changes into a separate commit if reviewers want to look at changes without formatting noise. If, given the volume of changes here, there is an appetite to remove `OpenMP` and `OMP` from names inside `SemaOpenMP` right in this patch, I can do

[clang] [clang][NFC] Factor out VLA check in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88646 This is a follow-up to #88473 suggested by @cor3ntin in https://github.com/llvm/llvm-project/pull/88473#discussion_r1562198117. >From 34d735b2f85e3c24cbf725f6a519afec6c916820 Mon Sep 17 00:00:00 2001 From: Vlad

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88644 >From 9d46b1ed31d2acbb772f9bb4b139fa1ec36a65ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Apr 2024 08:46:27 +0300 Subject: [PATCH] [clang] Fix name conflict with `sys/mac.h` on AIX Fixes

[clang] [clang] Fix name conflict with `sys/mac.h` on AIX (PR #88644)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -5012,6 +5012,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, return From; } +/// Checks that type T is not a VLA. +/// +/// @returns @c true if @p T is VLA and a diagnostic was emitted, +/// @c false otherwise. +static bool

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP () { Endilll wrote: This was discussed back when we started splitting `Sema` up: https://github.com/llvm/llvm-project/pull/84184#discussion_r1520027821. We

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think I exposed a name conflict with a system header on AIX by including `Cuda.h` in `Sema.h`. Given that this name conflict potentially affects both enum definition and its usage, how should we resolve this? https://github.com/llvm/llvm-project/pull/88559

[clang] [clang][NFC] Factor out VLA checks in type traits (PR #88646)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11,6 +11,7 @@ /// //===--===// +#include "clang/Sema/SemaOpenMP.h" Endilll wrote: Main module header goes first per our coding standard:

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase { return *OpenACCPtr; } + SemaOpenMP () { +assert(OpenMPPtr); Endilll wrote: Done https://github.com/llvm/llvm-project/pull/88642 ___ cfe-commits

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/88666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaOpenMP` (PR #88642)

2024-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88354 A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. >From ecff8db824552872ba055fdc0bca42b1a0386c39 Mon Sep 17

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98 -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes CXX98 +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old Endilll wrote: We don't test

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new Endilll wrote: Why only C++23 is tested? DR tests should test all language modes. https://github.com/llvm/llvm-project/pull/89807

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old Endilll wrote: > Since the core

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -12702,7 +12702,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2149.html;>2149 drafting Brace elision and array length deduction -Not resolved +Not Resolved* Endilll wrote: As I mentioned in

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old Endilll wrote: Given that you're

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @shafik I wonder how checking size of a vector is now considered an expensive check. (I stumbled upon it while reviewing) https://github.com/llvm/llvm-project/blob/47682e4b4a0c8e7637d65868a7208aa6806a50f4/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp#L99-L101

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you for spotting and fixing this! https://github.com/llvm/llvm-project/pull/90012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -432,9 +424,8 @@ The following example is not allowed: $ clang++ -std=c++20 M.cppm --precompile -o M.pcm $ clang++ -std=c++23 Use.cpp -fprebuilt-module-path=. -The compiler would reject the example due to the inconsistent language options. -Not all options are language

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -776,9 +773,9 @@ export-using style using decl_n; } -As the example shows, you need to include all the headers containing declarations needs -to be exported and `using` such declarations in an `export` block. Then, basically, -we're done. +This example shows how to

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -1817,27 +1804,29 @@ But with optimizations, things are different: │ │ └---┘ -It would be very unfortunate if we end up with worse performance after using modules.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp --->

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit that is rather shallow due to sheer amount of text, but it still took me more like 90 minutes. Hope you find it useful. https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` or a ``module interface partition unit``. -* An ``importable module unit`` refers to either a ``module interface

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -279,8 +266,9 @@ we could put ``-x c++-module`` in front of the file. For example, return 0; } -Now the filename of the ``module interface`` ends with ``.cpp`` instead of ``.cppm``, -we can't compile them by the original command lines. But we are still able to do

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted.

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/90079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90220 Fixes #89544 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH] [clang] Fix crash when destructor definition

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/2] [clang] Fix crash when destructor definition is

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I have a vague feeling I might be fixing the symptom instead of the cause. https://github.com/llvm/llvm-project/pull/90220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to `Sema.h` and DR tests look good to me. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

2024-04-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90352 Currently we're using official publication of CWG issue list available at https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html. Unfortunately, it's not updated as frequently as we sometimes need. For

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-27 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM @erichkeane mind giving CWG650 test a quick look? https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
@@ -4,7 +4,7 @@ // RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK // RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o -

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Sirraide See example of https://github.com/llvm/llvm-project/blob/662ef8604268b207910225ecca90daf30a46720b/clang/test/CXX/drs/dr25xx.cpp#L148 In this case, the date should be 2024-04-19. https://github.com/llvm/llvm-project/pull/89828

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90079 This patch adds test for [CWG2149](https://cplusplus.github.io/CWG/issues/2149.html), following [P3106R1](https://wg21.link/p3106R1) "Clarifying rules for brace elision in aggregate initialization" and a

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: >Can you add examples 14, 16, 17, 18 of the paper? I'll add them to conformance test suite in a subsequent PR. They don't belong here, as the issue is about deducing array length from brace initializer, but the examples you're listing are focusing on various aspects of how

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Status of 2149 changed just yesterday to say DR per 2024 Tokyo straw poll. That's where the discrepancy between official `cwg_index.html` and CWG GitHub repo comes (that I link in the description). https://github.com/llvm/llvm-project/pull/90079

[clang] 662ef86 - [clang][NFC] Remove useless code in ASTWriter

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-24T11:09:06+03:00 New Revision: 662ef8604268b207910225ecca90daf30a46720b URL: https://github.com/llvm/llvm-project/commit/662ef8604268b207910225ecca90daf30a46720b DIFF:

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
@@ -3597,8 +3597,13 @@ class ASTIdentifierTableTrait { /// doesn't check whether the name has macros defined; use PublicMacroIterator /// to check that. bool isInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset) { -if (MacroOffset ||

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,304 @@ +//===- SemaCUDA.h - Semantic Analysis for CUDA constructs -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/5] [clang] Implement

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Have you run the CUDA / HIP tests in the external test suite or anything? No, just `check-clang` target. You think it's necessary to run something else before merging? If so, you should point me out to what to run, and preferably give some instructions, as CUDA development is

[clang] Stop double-diagnosing explicit convert operator in switch condition (PR #89142)

2024-04-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm having second thoughts about leveraging recovery expressions as a side-band mechanism to de-duplicate diagnostics, because not modeling things properly in AST might backfire in the future. But I don't have anything better on my mind, so I don't want to block the progress of

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/90376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm fine with the way DR test is written, but I'm not qualified to review the contents on the test, unfortunately. I'd like to point to related Core issues [CWG2836](https://cplusplus.github.io/CWG/issues/2836.html) and

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/3] [clang] Fix crash when destructor definition is

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Vlad Serebrennikov via cfe-commits
@@ -137,17 +137,16 @@ namespace InhCtor { int n = b.T(); // expected-error {{'T' is a protected member of 'InhCtor::A'}} // expected-note@-15 {{declared protected here}} - // FIXME: EDG and GCC reject this too, but it's not clear why it would be - //

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/91435 >From 32e3c974d5f3f5651c5805210a7215af4d6df24b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 8 May 2024 09:31:32 +0300 Subject: [PATCH] [clang] Add examples from [dcl.init.aggr] to C++ conformance

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-09 Thread Vlad Serebrennikov via cfe-commits
@@ -137,17 +137,16 @@ namespace InhCtor { int n = b.T(); // expected-error {{'T' is a protected member of 'InhCtor::A'}} // expected-note@-15 {{declared protected here}} - // FIXME: EDG and GCC reject this too, but it's not clear why it would be - //

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @bgra8 Your reduction has names replaced by the tool. This is quite hard to work with. Can you reduce again, but with renaming passes disabled? I uploaded your reproducer to CE: https://godbolt.org/z/9PK1oPoPW https://github.com/llvm/llvm-project/pull/89807

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: If you're using `creduce`, this set of arguments disables all renaming passes: `--remove-pass pass_clang rename-fun --remove-pass pass_clang rename-param --remove-pass pass_clang rename-var --remove-pass pass_clang rename-class --remove-pass pass_clang rename-cxx-method

[clang] [clang][NFC] Add examples from [dcl.init.aggr] to C++ conformance tests (PR #91435)

2024-05-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/91435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Undefined Behavior introduced by #91199 (PR #91718)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM You should leave a link in the description to the buildbot failure you're addressing. https://github.com/llvm/llvm-project/pull/91718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Fix handling of fields with initializers in nested anonymous unions. (PR #91692)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM, but someone else should take a look as well. https://github.com/llvm/llvm-project/pull/91692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to DR tests look good to me. https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This file is not going to be picked up by the `make_cxx_dr_status`, because it's not in `clang/test/CXX/drs`. If we're implementing what Jason Merill speaks of (_In deduction we can determine that P is more specialized than B, then substitute

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Also, this needs to test a non-conforming mode until we finally remove the > corresponding flag, and that is against the rules for the DR suite. You should be able to split conforming part of the test into DR test, though.

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/90786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Sounds like should perhaps note that we are implementing our own resolution, > until there's an update to the cwg issue that can be referred to? Our tooling is not ready for describing own own resolutions, unfortunately. Ideally if we have a

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-02 Thread Vlad Serebrennikov via cfe-commits
@@ -9739,6 +9739,9 @@ class Sema final : public SemaBase { const PartialDiagnostic , bool Complain = true, QualType TargetType = QualType()); + FunctionDecl *getMoreConstrainedFunction(FunctionDecl *FD1, Endilll

[clang] d358b2d - [clang][NFC] Rename C++ CWG DR test files to use `cwg` prefix

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-10T19:00:20+03:00 New Revision: d358b2de458e0611a3f474a9c3e3deff926c07c4 URL: https://github.com/llvm/llvm-project/commit/d358b2de458e0611a3f474a9c3e3deff926c07c4 DIFF:

[clang] [clang] Add test for CWG1820 "Qualified typedef names" (PR #91765)

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/91765 [P1787R6](https://wg21.link/p1787r6): > [CWG1820](https://cplusplus.github.io/CWG/issues/1820.html) is resolved by > requiring that a qualified declarator-id declare an entity. P1787R6 changes wording of

[clang] ef71c79 - [clang][NFC] Update C++ DR status page

2024-05-10 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-10T19:03:21+03:00 New Revision: ef71c79d85fb3f94f19a92a84ab44719d112c1bd URL: https://github.com/llvm/llvm-project/commit/ef71c79d85fb3f94f19a92a84ab44719d112c1bd DIFF:

[clang] [clang] Add test for CWG1820 "Qualified typedef names" (PR #91765)

2024-05-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/91765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaObjC` (PR #89086)

2024-05-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/89086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-05-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR tests changes LGTM https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    4   5   6   7   8   9   10   11   12   13   >