[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } + // Number of digits in a group between separators + int Grouping = 4; tbaederr wrote: ```suggestion unsigned Grouping = (Radix == 8 || Radix == 10)

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } + // Number of digits in a group between separators tbaederr wrote: ```suggestion // Number of digits in a group between separators. ``` https://gith

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2774,7 +2774,8 @@ static bool CheckedIntArithmetic(EvalInfo &Info, const Expr *E, if (Info.checkingForUndefinedBehavior()) Info.Ctx.getDiagnostics().Report(E->getExprLoc(), diag::warn_integer_constant_overflow) - <<

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-02-09 Thread via cfe-commits
@@ -82,6 +88,13 @@ class SparcSubtarget : public SparcGenSubtargetInfo { return is64Bit() ? 2047 : 0; } + bool isRegisterReserved(MCPhysReg PhysReg) const { +if (PhysReg >= SP::G0 && PhysReg <= SP::O7) + return ReserveRegister[PhysReg - SP::G0]; ---

[clang] 0d9decc - [clang][Interp] Handle invalid CXXCtorInitializer expressions

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T09:20:41+01:00 New Revision: 0d9decc6694c188e2f7fa17d140ba9bd7cc98b6b URL: https://github.com/llvm/llvm-project/commit/0d9decc6694c188e2f7fa17d140ba9bd7cc98b6b DIFF: https://github.com/llvm/llvm-project/commit/0d9decc6694c188e2f7fa17d140ba9bd7cc98b6b.diff LO

[clang] 173e674 - [clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T00:21:09-08:00 New Revision: 173e674ba55eb93e8af43f2eece7feffe9954b34 URL: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34 DIFF: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34.diff LOG:

[clang] df2513c - [clang][Interp] Fix three-way comparison detection

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T10:12:25+01:00 New Revision: df2513c80bbd444ce97d28961bd5c20ffd7d3c44 URL: https://github.com/llvm/llvm-project/commit/df2513c80bbd444ce97d28961bd5c20ffd7d3c44 DIFF: https://github.com/llvm/llvm-project/commit/df2513c80bbd444ce97d28961bd5c20ffd7d3c44.diff LO

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-02-09 Thread Sergei Barannikov via cfe-commits
@@ -82,6 +88,13 @@ class SparcSubtarget : public SparcGenSubtargetInfo { return is64Bit() ? 2047 : 0; } + bool isRegisterReserved(MCPhysReg PhysReg) const { +if (PhysReg >= SP::G0 && PhysReg <= SP::O7) + return ReserveRegister[PhysReg - SP::G0]; ---

[clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-09 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: > mad_mix I added run lines to `mad-mix.ll` and it behaves as expected: no fma/mad_mix emitted https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] 79e43eb - [clang][Interp] Protect ArrayDecay ops against dummy pointers

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T10:12:26+01:00 New Revision: 79e43eb3e20484bdb6f32eecc336742dd721fcc9 URL: https://github.com/llvm/llvm-project/commit/79e43eb3e20484bdb6f32eecc336742dd721fcc9 DIFF: https://github.com/llvm/llvm-project/commit/79e43eb3e20484bdb6f32eecc336742dd721fcc9.diff LO

[clang] 9e73656 - [clang][Interp] Support ExpressionTraitExprs

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T10:23:54+01:00 New Revision: 9e73656af524a2c592978aec91de67316c5ce69f URL: https://github.com/llvm/llvm-project/commit/9e73656af524a2c592978aec91de67316c5ce69f DIFF: https://github.com/llvm/llvm-project/commit/9e73656af524a2c592978aec91de67316c5ce69f.diff LO

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/81225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: I don't have anything to add, except release notes nits, but I'd like to someone else to take a look. cc @shafik @cor3ntin @AaronBallman My question about why can't we do the same as non-template version does remains unanswered. https://github.com/llvm/

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -149,9 +149,10 @@ Improvements to Clang's diagnostics prints. - Clang now diagnoses member template declarations with multiple declarators. +- Clang now diagnoses use of the ``template`` keyword after declarative nested name specifiers. -- Clang now diagnoses use of th

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -149,9 +149,10 @@ Improvements to Clang's diagnostics prints. - Clang now diagnoses member template declarations with multiple declarators. +- Clang now diagnoses use of the ``template`` keyword after declarative nested name specifiers. Fznamznon wrote:

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-09 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Sorry I was not able to look into the comments for last few days as semester exams are currently going on, I have added the commit suggestions currently and will update with the tests I have written by sunday as exams end. Thank you. https://github.com/llvm/llvm-project/pull/800

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-09 Thread Bhuminjay Soni via cfe-commits
@@ -3780,6 +3780,30 @@ static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) { << NI.getName() << ParamTy << Ty; return; } + VarDecl *VD = cast(D); + // Create a reference to the variable declaration. This is a fake/dummy + // reference. + DeclR

[clang] 5609bd8 - Revert "[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)"

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T01:52:41-08:00 New Revision: 5609bd83c3bd39a7522b05b32decc9e3c8ad08ae URL: https://github.com/llvm/llvm-project/commit/5609bd83c3bd39a7522b05b32decc9e3c8ad08ae DIFF: https://github.com/llvm/llvm-project/commit/5609bd83c3bd39a7522b05b32decc9e3c8ad08ae.diff LOG:

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81225 >From aeb0686c76f2745111acd92c0d6b77faf69d2ed6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Thu, 8 Feb 2024 10:51:22 -0800 Subject: [PATCH 1/3] [Clang][Sema] Diagnosis for constexpr constructor not initial

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81225 >From aeb0686c76f2745111acd92c0d6b77faf69d2ed6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Thu, 8 Feb 2024 10:51:22 -0800 Subject: [PATCH 1/4] [Clang][Sema] Diagnosis for constexpr constructor not initial

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-09 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/81239 This function will be useful when we change the behavior of record-type prvalues so that they directly initialize the associated result object. See also the comment here for more details: https://github.com/

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This function will be useful when we change the behavior of record-type prvalues so that they directly initialize the associated result object. See also the comment here for more details: https://github.com/llvm

[clang] 245d772 - Revert "[clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d"

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T01:53:47-08:00 New Revision: 245d7727d51548c3d5d867b69b1f9b1efff2502e URL: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e DIFF: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e.diff LOG:

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-09 Thread via cfe-commits
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 faa2f9658a0cd276f3415fad2676f8d90df51268 bb1f67f83b0826585f0437789526eaf5af9944bf --

[clang] c227eca - [clang][Interp][NFC] Convert test case to verify=expected,both style

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T11:01:31+01:00 New Revision: c227eca73970c65d9663e6d65abe3f9daef2a25f URL: https://github.com/llvm/llvm-project/commit/c227eca73970c65d9663e6d65abe3f9daef2a25f DIFF: https://github.com/llvm/llvm-project/commit/c227eca73970c65d9663e6d65abe3f9daef2a25f.diff LO

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-09 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/81239 >From bdd8b6c864c46c79f28182cd855690c42a46ad8b Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Fri, 9 Feb 2024 10:05:18 + Subject: [PATCH] [clang][dataflow] Add `Environment::initializeFieldsWithVal

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread via cfe-commits
mahtohappy wrote: @Fznamznon in non-template version ```else if (!Constructor->isDependentContext() && !Constructor->isDelegatingConstructor())``` this is the check that is performed and `isDependentContext` is true for templates, so I have separate condition for template versio

[clang] 02362b1 - [clang-format] Check token size in QualifierFixerTest.cpp

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T02:14:50-08:00 New Revision: 02362b1ad1c07a01714b195d769400dd40dbfd04 URL: https://github.com/llvm/llvm-project/commit/02362b1ad1c07a01714b195d769400dd40dbfd04 DIFF: https://github.com/llvm/llvm-project/commit/02362b1ad1c07a01714b195d769400dd40dbfd04.diff LOG:

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > @Fznamznon in non-template version `else if > (!Constructor->isDependentContext() > &&!Constructor->isDelegatingConstructor())` this is the check that is > performed and `isDependentContext` is true for templates, so I have separate > condition for template versions. I'm do

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variabl

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-09 Thread Kishan Parmar via cfe-commits
@@ -486,7 +486,8 @@ std::unique_ptr createAIXTargetCodeGenInfo(CodeGenModule &CGM, bool Is64Bit); std::unique_ptr -createPPC32TargetCodeGenInfo(CodeGenModule &CGM, bool SoftFloatABI); +createPPC32TargetCodeGenInfo(CodeGenModule &CGM, bool SoftFloatABI, +

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vinayak Dev via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variabl

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 1/8] Fix : bugprone-too-small-loop-variable --- .../bugprone/TooS

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -156,6 +156,10 @@ Changes in existing checks `AllowStringArrays` option, enabling the exclusion of array types with deduced length initialized from string literals. +- Improved :doc:`bugprone-too-small-loop-variable Sh0g0-1758 wrote: I don't think I u

[clang] 2cb61a1 - [clang][Interp] Fix initializing PredefinedExprs

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T11:54:40+01:00 New Revision: 2cb61a1d117e2c20e3372bc23bf12b919feaaca2 URL: https://github.com/llvm/llvm-project/commit/2cb61a1d117e2c20e3372bc23bf12b919feaaca2 DIFF: https://github.com/llvm/llvm-project/commit/2cb61a1d117e2c20e3372bc23bf12b919feaaca2.diff LO

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-09 Thread via cfe-commits
mahtohappy wrote: Inside that condition it doesn't check for if Union member is initialized but `"constexpr constructor that does not initialize all members"` that's separate check. https://github.com/llvm/llvm-project/pull/81225 ___ cfe-commits mai

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = - expr(ignoringParenImpCasts(

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variabl

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
cor3ntin wrote: cc @erichkeane @AaronBallman https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
@@ -8400,19 +8412,28 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, /// when these variables are captured by the lambda. void Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) { for (const auto &Shadow : LSI->ShadowingDecls) { -const VarDec

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 1/9] Fix : bugprone-too-small-loop-variable --- .../bugprone/TooS

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vinayak Dev via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variabl

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def warn_sme_streaming_caller_pass_args_t

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
@@ -179,3 +179,64 @@ void f() { #endif } } + +namespace GH71976 { +#ifdef AVOID +struct A { + int b = 5; + int foo() { +return [b = b]() { return b; }(); // no -Wshadow diagnostic, init-capture does not shadow b due to not capturing this + } +}; + +struct B { + int a;

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
@@ -8328,35 +8328,47 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the cal

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
@@ -8328,35 +8328,47 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def warn_sme_streaming_caller_pass_args_t

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = - expr(ignoringParenImpCasts(

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 deleted https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void conflicting_state_attrs_preserves_inou

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && sdesmalen-arm wrote: This code req

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: The changes in LibASTMatcher that you suggested resulted in test failures so I did not incorporate them. As far as doc change is considered, please elaborate on it. https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits ma

[clang] [clang] Stop reporting unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78836 >From c931f87fdabe83e1e3507f0e52ebb3201a41cb82 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 12:04:32 +0300 Subject: [PATCH 1/3] [clang] Stop reporting unresolved issues in `cxx_dr_sta

[clang] [clang] Stop reporting unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78836 >From c931f87fdabe83e1e3507f0e52ebb3201a41cb82 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 12:04:32 +0300 Subject: [PATCH 1/4] [clang] Stop reporting unresolved issues in `cxx_dr_sta

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vinayak Dev via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify -std=gnu++11 %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variabl

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Looks like we've done something similar for `target_clones` to fix a linker issue: https://github.com/llvm/llvm-project/commit/cee5b8777fa98312b05bf8aa81554910a8f867c5. What is the motive in this case? https://github.com/llvm/llvm-project/pull/81194 ___

[clang] [clang] Stop reporting unresolved issues in `cxx_dr_status.html` (PR #78836)

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

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > Looks like we've done something similar for `target_clones` to fix a linker > issue: > [cee5b87](https://github.com/llvm/llvm-project/commit/cee5b8777fa98312b05bf8aa81554910a8f867c5). > What is the motive in this case? Ah, I just saw that it fixes https://github.com/llvm/

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

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

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-09 Thread Balázs Kéri via cfe-commits
balazske wrote: The change was evaluated on the following projects. "Lost reports" shows results that disappear if the `ModelPOSIX` option is changed to true. "New reports" shows the new results. Many of the new results come from the large number of modeled functions. The lost reports are more

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @AaronBallman I updated this PR following our offline discussion. Title, description, contents are basically all new. @cor3ntin It would be nice if you can go over your tests to check that date or paper number is what you want them to be. I filled them in based on latest resolu

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Piotr Zegar via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = - expr(ignoringParenImpCasts(

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Piotr Zegar via cfe-commits
@@ -156,6 +156,10 @@ Changes in existing checks `AllowStringArrays` option, enabling the exclusion of array types with deduced length initialized from string literals. +- Improved :doc:`bugprone-too-small-loop-variable PiotrZSL wrote: In short, move this

[clang] eb9cd80 - [Clang][TableGen] Add Features to TargetBuiltin

2024-02-09 Thread via cfe-commits
Author: Wang Pengcheng Date: 2024-02-09T20:28:34+08:00 New Revision: eb9cd800b3c8c787f75c00e7d9de3ae6a2e5f876 URL: https://github.com/llvm/llvm-project/commit/eb9cd800b3c8c787f75c00e7d9de3ae6a2e5f876 DIFF: https://github.com/llvm/llvm-project/commit/eb9cd800b3c8c787f75c00e7d9de3ae6a2e5f876.diff

[clang] [Clang][TableGen] Add Features to TargetBuiltin (PR #80279)

2024-02-09 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/80279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Support per-function [[clang::code_align(N)]] attribute. (PR #80765)

2024-02-09 Thread Anton Bikineev via cfe-commits
AntonBikineev wrote: > Aligning the targets of branches is a different thing from what you've > implemented. There are basic blocks which are not branch targets, and there > are branch targets which are not at the beginning of a basic block. (Branch > targets that aren't at the beginning of a

[clang] a8d4a02 - [Clang][RISCV] Refactor builtins to TableGen

2024-02-09 Thread via cfe-commits
Author: Wang Pengcheng Date: 2024-02-09T20:34:22+08:00 New Revision: a8d4a024e6bea3ae71d6187f0c040b2b25e4bf69 URL: https://github.com/llvm/llvm-project/commit/a8d4a024e6bea3ae71d6187f0c040b2b25e4bf69 DIFF: https://github.com/llvm/llvm-project/commit/a8d4a024e6bea3ae71d6187f0c040b2b25e4bf69.diff

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I feel whether the param is needed is not related whether the allocation happens. The param isn't needed means it is not used. https://github.com/llvm/llvm-project/pull/81195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/81194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` (PR #81227)

2024-02-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81227 >From c2b49a5317bf5b8af419cba814f95cc9305bec21 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 8 Feb 2024 23:12:54 +0900 Subject: [PATCH] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` Introduce

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-09 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/81251 Resolves Issue #80963 As described in the snippet of the issue, `A` is correctly detected while it fails to reject in other cases. >From c931dd64e63817619c6b7f649828580b3fb2e6ec Mon Sep 17 00:00:00 2001 From

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rajveer Singh Bharadwaj (Rajveer100) Changes Resolves Issue #80963 As described in the snippet of the issue, `A` is correctly detected while it fails to reject in other cases. --- Full diff: https://github.com/llvm/llvm-project/pull

[clang] [clang] Clang should detect illegal copy constructor with template class as its parameter (PR #81251)

2024-02-09 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @cor3ntin @shafik I am not quite sure if this is the intended fix, also I will check the few other failing tests once the _CI_ completes its job. https://github.com/llvm/llvm-project/pull/81251 ___ cfe-commits mailing list cfe-comm

[clang] [clang] Fix clang++ crash on assertions when compiling source (PR #70594)

2024-02-09 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @shafik Could you let me know if there are any more changes that are needed here? https://github.com/llvm/llvm-project/pull/70594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

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

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -3780,6 +3780,30 @@ static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) { << NI.getName() << ParamTy << Ty; return; } + VarDecl *VD = cast(D); + // Create a reference to the variable declaration. This is a fake/dummy + // reference. + DeclR

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > cc @erichkeane @AaronBallman I looked through and don't see anything of concern to me that you haven't covered. I am on the fence as to whether this warning makes sense to have in this situation. The point of the warning isn't that the language has a problem, it is that

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -82,10 +82,14 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) { // We are interested in only those cases when the loop bound is a variable // value (not const, enum, etc.). StatementMatcher LoopBoundMatcher = - expr(ignoringParenImpCasts(

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 01/10] Fix : bugprone-too-small-loop-variable --- .../bugprone/To

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -156,6 +156,10 @@ Changes in existing checks `AllowStringArrays` option, enabling the exclusion of array types with deduced length initialized from string literals. +- Improved :doc:`bugprone-too-small-loop-variable Sh0g0-1758 wrote: Ah, that's what y

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: I believe all the issues are addressed now. https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-09 Thread via cfe-commits
vabridgers wrote: LGTM, but someone else must approve. Thanks for doing this work, Axel! https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/79981 >From 634c7d1a1205c9d047f8b3000cb93128a278006f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 30 Jan 2024 14:01:11 +0300 Subject: [PATCH 1/3] [clang] Add tests for DRs about inheriting constructors

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-09 Thread via cfe-commits
Sirraide wrote: Alright, done. I’ve also set my email address to public now since I only just realised that it was still set to private https://github.com/llvm/llvm-project/pull/81014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/81188 >From b7ca554663c4d0994ac255ee17ac016ef94f6778 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 8 Feb 2024 07:56:30 -0800 Subject: [PATCH 1/3] [OpenACC] Implement AST for OpenACC Compute Constructs 'seria

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Piotr Zegar via cfe-commits
@@ -28,6 +28,8 @@ In a real use case size means a container's size which depends on the user input This algorithm works for a small amount of objects, but will lead to freeze for a larger user input. +It's recommended to enable the compiler warning -Wtautological-constant-ou

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Alexey Bataev via cfe-commits
@@ -2145,7 +2145,11 @@ enum CXCursorKind { */ CXCursor_OMPScopeDirective = 306, - CXCursor_LastStmt = CXCursor_OMPScopeDirective, + /** OpenACC Compute Construct. + */ + CXCursor_OpenACCComputeConstruct = 307, alexey-bataev wrote: I would suggest to

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,142 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- C++ -*-===// +// +// 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: Ap

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,142 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- C++ -*-===// +// +// 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: Ap

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-09 Thread Aaron Ballman via cfe-commits
@@ -3780,6 +3780,30 @@ static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) { << NI.getName() << ParamTy << Ty; return; } + VarDecl *VD = cast(D); + // Create a reference to the variable declaration. This is a fake/dummy + // reference. + DeclR

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -2145,7 +2145,11 @@ enum CXCursorKind { */ CXCursor_OMPScopeDirective = 306, - CXCursor_LastStmt = CXCursor_OMPScopeDirective, + /** OpenACC Compute Construct. + */ + CXCursor_OpenACCComputeConstruct = 307, erichkeane wrote: Thats a good idea, an

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/81188 >From b7ca554663c4d0994ac255ee17ac016ef94f6778 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 8 Feb 2024 07:56:30 -0800 Subject: [PATCH 1/4] [OpenACC] Implement AST for OpenACC Compute Constructs 'seria

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,142 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- C++ -*-===// +// +// 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: Ap

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emi

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,142 @@ +//===- StmtOpenACC.h - Classes for OpenACC directives --*- C++ -*-===// +// +// 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: Ap

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-09 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/81188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >