[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -607,6 +607,29 @@ static void instantiateDependentAMDGPUWavesPerEUAttr( S.addAMDGPUWavesPerEUAttr(New, Attr, MinExpr, MaxExpr); } +static void instantiateDependentAMDGPUMaxNumWorkGroupsAttr( +Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, +const AMDG

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,67 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +// Returns true if error erichkeane wrote: Comment not necessary, just remove i

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,67 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +// Returns true if error +static bool +checkAMDGPUMaxNumWorkGroupsArguments(Sema &S, Expr *XExpr,

[clang] [clang-tools-extra] [compiler-rt] [flang] [libclc] [libcxx] [lld] [lldb] [llvm] [NFC] Remove trailing whitespace across all non-test related files (PR #82838)

2024-02-26 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > This seems akin to running clang-format on the entire project, which last > time we talked about still faced opposition My impression (I admit I haven't reviewed the whole thread lately) is that the opposition has mostly to do with how clang-format mangles some constructs, not

[clang] 9cfb138 - [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (#82417)

2024-02-26 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-26T09:58:55-05:00 New Revision: 9cfb138eccb83b5876928b08be346fde5ca78b47 URL: https://github.com/llvm/llvm-project/commit/9cfb138eccb83b5876928b08be346fde5ca78b47 DIFF: https://github.com/llvm/llvm-project/commit/9cfb138eccb83b5876928b08be346fde5ca78b47

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/82417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/83013 Crashes resulted from single-element InitListExprs for arrays with elements of a record type after #80970. >From ee395ff3555efa5cbeae4d874f3ad39c52b85faf Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Mon, 2

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samira Bazuzi (bazuzi) Changes Crashes resulted from single-element InitListExprs for arrays with elements of a record type after #80970. --- Full diff: https://github.com/llvm/llvm-project/pull/83013.diff 2 Files Affected: - (modified

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 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 83feb846482f0100cb29d460d3d8de2690fc32ad ee395ff3555efa5cbeae4d874f3ad39c52b85faf --

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread via cfe-commits
https://github.com/martinboehme approved this pull request. https://github.com/llvm/llvm-project/pull/83013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: I have reduced the scope of the PR, and changed the title and the description accordingly. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/83013 >From ee395ff3555efa5cbeae4d874f3ad39c52b85faf Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Mon, 26 Feb 2024 10:00:48 -0500 Subject: [PATCH 1/2] [clang][dataflow] Skip array types when handling InitListExpr

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/82956 >From bd87c56b2d96b834788e8fa449f3ac308faec1f0 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 25 Feb 2024 11:13:40 -0500 Subject: [PATCH] [HIP] fix host min/max in header CUDA defines min/max funct

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Joseph Huber via cfe-commits
@@ -1306,14 +1306,50 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } +// Define host min/max functions. + #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -_

[clang] b504870 - [clang][Interp] Fix lvalue CompoundLiteralExprs

2024-02-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-26T16:39:43+01:00 New Revision: b5048700fc31f3bf6dd32ace7730815d4cfef411 URL: https://github.com/llvm/llvm-project/commit/b5048700fc31f3bf6dd32ace7730815d4cfef411 DIFF: https://github.com/llvm/llvm-project/commit/b5048700fc31f3bf6dd32ace7730815d4cfef411.diff LO

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/83013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 264d828 - [clang][Interp][NFC] Redo returning values from builtin functions

2024-02-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-26T16:46:23+01:00 New Revision: 264d828ea6399c31c210b67a050fbf084634da6a URL: https://github.com/llvm/llvm-project/commit/264d828ea6399c31c210b67a050fbf084634da6a DIFF: https://github.com/llvm/llvm-project/commit/264d828ea6399c31c210b67a050fbf084634da6a.diff LO

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/78759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f540044 - [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (#78759)

2024-02-26 Thread via cfe-commits
Author: mmoadeli Date: 2024-02-26T21:19:02+05:30 New Revision: f54004475110bb0a4033261041594266c8296242 URL: https://github.com/llvm/llvm-project/commit/f54004475110bb0a4033261041594266c8296242 DIFF: https://github.com/llvm/llvm-project/commit/f54004475110bb0a4033261041594266c8296242.diff LOG:

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/78759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-26 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/82689 >From 93e17e4a53ddbc8203951617d54b146be7ffc0fb Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 22 Feb 2024 22:10:09 +0100 Subject: [PATCH] [clang-tidy] Improve `google-explicit-constructor` checks handling of `expl

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-26 Thread via cfe-commits
AMS21 wrote: Rebased and addressed review comments https://github.com/llvm/llvm-project/pull/82689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c27d708 - [clang][test] Undo an accidental test change

2024-02-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-26T16:51:11+01:00 New Revision: c27d7085d4d5c640aba4992f5d01c0ffd1da9860 URL: https://github.com/llvm/llvm-project/commit/c27d7085d4d5c640aba4992f5d01c0ffd1da9860 DIFF: https://github.com/llvm/llvm-project/commit/c27d7085d4d5c640aba4992f5d01c0ffd1da9860.diff LO

[clang] 2730a5c - [clang][dataflow] Skip array types when handling InitListExprs. (#83013)

2024-02-26 Thread via cfe-commits
Author: Samira Bazuzi Date: 2024-02-26T10:53:33-05:00 New Revision: 2730a5c68c6986bc8f01d047f8f31bcfd9316333 URL: https://github.com/llvm/llvm-project/commit/2730a5c68c6986bc8f01d047f8f31bcfd9316333 DIFF: https://github.com/llvm/llvm-project/commit/2730a5c68c6986bc8f01d047f8f31bcfd9316333.diff

[clang] [clang][dataflow] Skip array types when handling InitListExprs. (PR #83013)

2024-02-26 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed https://github.com/llvm/llvm-project/pull/83013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-26 Thread via cfe-commits
@@ -147,6 +147,10 @@ Changes in existing checks ` check by replacing the local option `HeaderFileExtensions` by the global option of the same name. +- Improved :doc:`google-explicit-constructor + ` check to better handle + C++-20 `explicit(bool)`. Eugene

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-26 Thread Krasimir Georgiev via cfe-commits
https://github.com/krasimirgg closed https://github.com/llvm/llvm-project/pull/82773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b2ebd8b - clang serialization unittests: fix some leaks (#82773)

2024-02-26 Thread via cfe-commits
Author: Krasimir Georgiev Date: 2024-02-26T16:58:39+01:00 New Revision: b2ebd8b89777a1c5ba6acc4ad9f195ea2ad5f0de URL: https://github.com/llvm/llvm-project/commit/b2ebd8b89777a1c5ba6acc4ad9f195ea2ad5f0de DIFF: https://github.com/llvm/llvm-project/commit/b2ebd8b89777a1c5ba6acc4ad9f195ea2ad5f0de.d

[clang] [OpenMP] Remove complex reduction variable support (PR #82497)

2024-02-26 Thread Akash Banerjee via cfe-commits
TIFitis wrote: Ping for review. https://github.com/llvm/llvm-project/pull/82497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Fixes for LIT testing of FLANG_RUNTIME_F128_MATH_LIB build. (PR #82832)

2024-02-26 Thread Pete Steinfeld via cfe-commits
https://github.com/psteinfeld approved this pull request. All builds and tests correctly and looks good. https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [HLSL] Fix casting asserts (PR #82827)

2024-02-26 Thread Chris B via cfe-commits
@@ -28,3 +29,46 @@ void Fn2(int16_t2 S); void Call2(int2 I) { Fn2(I); } + +void Fn3( int64_t2 p0); + +// CHECK: FunctionDecl {{.*}} Call3 'void (half2)' +// CHECK: CallExpr {{.*}} 'void' +// CHECK-NEXT: ImplicitCastExpr {{.*}} 'void (*)(int64_t2)' +// CHECK-NEXT: DeclRefExp

[clang] [HLSL] Fix casting asserts (PR #82827)

2024-02-26 Thread Chris B via cfe-commits
@@ -28,3 +29,46 @@ void Fn2(int16_t2 S); void Call2(int2 I) { Fn2(I); } + +void Fn3( int64_t2 p0); + +// CHECK: FunctionDecl {{.*}} Call3 'void (half2)' +// CHECK: CallExpr {{.*}} 'void' +// CHECK-NEXT: ImplicitCastExpr {{.*}} 'void (*)(int64_t2)' +// CHECK-NEXT: DeclRefExp

[clang] [HLSL] Fix casting asserts (PR #82827)

2024-02-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/82827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-26 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/82689 >From 73e7c7d4d6d1752d0da6bfef9d933da418df71a5 Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 22 Feb 2024 22:10:09 +0100 Subject: [PATCH] [clang-tidy] Improve `google-explicit-constructor` checks handling of `expl

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: Would be good to feed back some of these examples to the RFC. Improving how clang-format handles some of these cases (esp. the doxygen ones) would help progress toward the goal. https://github.com/llvm/llvm-project/pull/82599 ___

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -107,7 +107,8 @@ class CallDescription { return CD1.matches(Call); } - /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &, const CallDescription &) + /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &, const + /// CallDes

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -219,17 +219,19 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { if (containsBadStrncatPattern(CE)) { const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); - PathDiagnosticLocation Loc = -PathDiagnosticLocation::createBegin(LenArg

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -393,20 +385,19 @@ class ExprEngine { ProgramStateRef processAssume(ProgramStateRef state, SVal cond, bool assumption); - /// processRegionChanges - Called by ProgramStateManager whenever a change is made + /// processRegionChanges - Cal

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { if (containsBadStrlcpyStrlcatPattern(CE)) { const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); - PathDiagnosticLocation Loc = -PathDiagnosticLocation::createBegin

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -393,20 +385,19 @@ class ExprEngine { ProgramStateRef processAssume(ProgramStateRef state, SVal cond, bool assumption); - /// processRegionChanges - Called by ProgramStateManager whenever a change is made + /// processRegionChanges - Cal

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { if (containsBadStrlcpyStrlcatPattern(CE)) { const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); - PathDiagnosticLocation Loc = -PathDiagnosticLocation::createBegin

[clang] 82acec1 - [HLSL] Implementation of dot intrinsic (#81190)

2024-02-26 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-02-26T10:08:59-06:00 New Revision: 82acec15afeb2bcba534a333c89cea33da7ffa47 URL: https://github.com/llvm/llvm-project/commit/82acec15afeb2bcba534a333c89cea33da7ffa47 DIFF: https://github.com/llvm/llvm-project/commit/82acec15afeb2bcba534a333c89cea33da7ffa47.diff

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/81190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske requested changes to this pull request. I would like better if the new tests that are invalidation-related are moved to file **stream-invalidate.c** (this was added in the recent commit). https://github.com/llvm/llvm-project/pull/82476 ___

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { balazske wrote: Has this test a purpose that is different from test `error_fscanf` in **stream_error.c**? https://github.com/llvm/llvm-project/pull

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/83024 When compiling the following with `-fms-compatibility`: ```cpp template struct C; // Test lookup with incomplete lookup context template auto C::f() -> decltype(x) { } ``` An assert fails because `CXXRecordDec

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-02-26 Thread Paul T Robinson via cfe-commits
@@ -1,10 +1,10 @@ -//===- unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit tests -===// +// unittest/ASTMatchers/Dynamic/VariantValueTest.cpp - VariantValue unit tests pogo59 wrote: Repeating the full path name seems unnecessary? (In various

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes When compiling the following with `-fms-compatibility`: ```cpp template struct C; // Test lookup with incomplete lookup context template auto C::f() -> decltype(x) { } ```

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Needs a release note if this exists in a previous release. Also, do you have a bug report here? https://github.com/llvm/llvm-project/pull/83024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/83027 1. `lineptr`, `n` and `stream` can not be `NULL` 2. if `*lineptr` is `NULL`, `*n` must be 0 This patch models `getline` specific preconditions, constraints the size to be greater than the

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83024 >From 1c57410ebef490ae96b0f087426b44ce6ae37f72 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 26 Feb 2024 11:03:06 -0500 Subject: [PATCH] [Clang][Sema] Fix crash when MS dependent base class loo

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes 1. `lineptr`, `n` and `stream` can not be `NULL` 2. if `*lineptr` is `NULL`, `*n` must be 0 This patch models `getline` specific

[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-26 Thread Jacek Caban via cfe-commits
https://github.com/cjacek updated https://github.com/llvm/llvm-project/pull/82888 >From 3f23b5ed11ef7453c64da562ad47701cc77ee3e0 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 24 Feb 2024 01:16:45 +0100 Subject: [PATCH 1/2] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host t

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-02-26 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 d0b1fec9e1510d01dad2c9c429573eaa75f0963c 5e62483adf6620d481bdb873dd91f81b8a95f6fc --

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane Added a release note. I don't believe there is an open issue (I did a cursory search), found this "in the wild". https://github.com/llvm/llvm-project/pull/83024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-02-26 Thread Alan Phipps via cfe-commits
@@ -1201,19 +1197,22 @@ void CodeGenPGO::emitMCDCCondBitmapUpdate(CGBuilderTy &Builder, const Expr *S, // Extract the ID of the condition we are setting in the bitmap. const auto &Branch = BranchStateIter->second; assert(Branch.ID >= 0 && "Condition has no ID!"); + asse

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 1/7] [c

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit on the release notes, else lgtm. https://github.com/llvm/llvm-project/pull/83024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -283,6 +283,7 @@ Bug Fixes to C++ Support (`#78524 `_) - Clang no longer instantiates the exception specification of discarded candidate function templates when determining the primary template of an explicit specializ

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/83024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { + FILE *F1 = tmpfile(); + if (!F1) +return; + + int a; + unsigned b; + int ret = fscanf(F1, "%d %u", &a, &b); + char c = fgetc(F1); // expected-warning {{Rea

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83027 From efd1411ff7fa93a84cb3d385cb55aa411af9e9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 21 Feb 2024 14:46:01 +0100 Subject: [PATCH] [clang

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -339,3 +363,138 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void test_fscanf_eof() { alejandro-alvarez-sonarsource wrote: Dropped. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-co

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
@@ -283,6 +283,7 @@ Bug Fixes to C++ Support (`#78524 `_) - Clang no longer instantiates the exception specification of discarded candidate function templates when determining the primary template of an explicit specializ

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 1/8] [c

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83024 >From 1c57410ebef490ae96b0f087426b44ce6ae37f72 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 26 Feb 2024 11:03:06 -0500 Subject: [PATCH 1/2] [Clang][Sema] Fix crash when MS dependent base class

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 1/9] [c

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -283,6 +283,7 @@ Bug Fixes to C++ Support (`#78524 `_) - Clang no longer instantiates the exception specification of discarded candidate function templates when determining the primary template of an explicit specializ

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-26 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a21881d82fe3674b344d4a3807e9d2590c98ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 01/10]

[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-26 Thread Jacek Caban via cfe-commits
https://github.com/cjacek updated https://github.com/llvm/llvm-project/pull/82888 >From 8ea9b943089de8a6c3f3a5161a4e89eab4975c2a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 24 Feb 2024 01:16:45 +0100 Subject: [PATCH] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host tripl

[clang] [llvm] [llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (PR #82888)

2024-02-26 Thread Jacek Caban via cfe-commits
cjacek wrote: I added documentation and rebased, thanks. https://github.com/llvm/llvm-project/pull/82888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
@@ -283,6 +283,7 @@ Bug Fixes to C++ Support (`#78524 `_) - Clang no longer instantiates the exception specification of discarded candidate function templates when determining the primary template of an explicit specializ

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
@@ -283,6 +283,7 @@ Bug Fixes to C++ Support (`#78524 `_) - Clang no longer instantiates the exception specification of discarded candidate function templates when determining the primary template of an explicit specializ

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83024 >From 1c57410ebef490ae96b0f087426b44ce6ae37f72 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 26 Feb 2024 11:03:06 -0500 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when MS dependent base class

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83024 >From 1c57410ebef490ae96b0f087426b44ce6ae37f72 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 26 Feb 2024 11:03:06 -0500 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when MS dependent base class

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Erich Keane via cfe-commits
erichkeane wrote: Side note: In the future can you be more descriptive with follow up commit messages, isntead of just `[FOLD]`. That doesn't really tell me whether I need to re-review/give context, particularly since I do much of that triage in email. As far as this patch, feel free to commi

[clang] [Clang][Sema] Fix crash when MS dependent base class lookup occurs in an incomplete context (PR #83024)

2024-02-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Side note: In the future can you be more descriptive with follow up commit > messages, isntead of just `[FOLD]`. That doesn't really tell me whether I > need to re-review/give context, particularly since I do much of that triage > in email. Apologies -- I'll keep this in m

[clang] [HLSL] Fix casting asserts (PR #82827)

2024-02-26 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/82827 >From 15eee3edd9ad834dc46fb5a1053874093b41a65a Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 23 Feb 2024 15:28:13 -0500 Subject: [PATCH 1/2] [HLSL] Fix casting asserts There are two issues here. first I

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 589d1da30803704c89f0ac5beece87de0dd9a250 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73099 >From 1d70b7726e7d1f11622a6d5c8246b0737e024c8d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 19 Sep 2023 08:37:18 -0700 Subject: [PATCH 01/12] [C23] Implement N3018: The constexpr specifier

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
AtariDreams wrote: Refactored for code consistency. https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
AtariDreams wrote: Wait, @rjmccall // Assume that anything declared with a forward declaration and no // @interface subclasses NSObject. Any reason why analysis can assume that but not codegen? Just curious. https://github.com/llvm/llvm-project/pull/81335 __

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -1382,6 +1382,20 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) { ThreadStorageClassSpec = TSCS_unspecified; ThreadStorageClassSpecLoc = SourceLocation(); } +if (S.getLangOpts().C23 && +getConstexprSpecifier() == ConstexprSpecKin

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=c23 -std=c23 %s -Wpre-c2x-compat +// RUN: %clang_cc1 -fsyntax-only -verify=c17 -std=c17 %s + + Fznamznon wrote: Added test cases. https://github.com/llvm/llvm-project/pull/73099 __

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,296 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero %s + +// Check that constexpr only applies to variables. +constexpr void f0() {} // expected-error {{'constexpr' can only be used in variable

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,296 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero %s + +// Check that constexpr only applies to variables. +constexpr void f0() {} // expected-error {{'constexpr' can only be used in variable

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

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

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,296 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero %s + +// Check that constexpr only applies to variables. +constexpr void f0() {} // expected-error {{'constexpr' can only be used in variable

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,296 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero %s + +// Check that constexpr only applies to variables. +constexpr void f0() {} // expected-error {{'constexpr' can only be used in variable

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -8569,6 +8571,37 @@ static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND, return false; } +static bool CheckC23ConstexprVarType(Sema &SemaRef, SourceLocation VarLoc, + QualType T) { + + if (T->isVariableArrayType())

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

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

<    1   2   3   4   5   >