[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-26 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Looks like the linter is upset with pre-existing changes. ok2land. Are you able to merge this @overmighty or do you need us to? https://github.com/llvm/llvm-project/pull/82359 ___ cfe-commits mailing list

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-26 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From 904957a034582f2d8805530bc51dad3df0f6 Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-26 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this change adds some overhead (about 0.2% for O0) builds (http://llvm-compile-time-tracker.com/compare.php?from=046682ef88a254443e8620bfd48b35bfa0a83809=440b1743ee0c8bfb7bf0c4b503bde5ab9af88dc0=instructions:u). Is it possible to avoid it for people not using API notes?

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-26 Thread Shahid Iqbal via cfe-commits
https://github.com/shahidiqbal13 updated https://github.com/llvm/llvm-project/pull/80976 >From b6bfb18e25c111baf6c95a0a4a1c3d667bb25b6d Mon Sep 17 00:00:00 2001 From: Shahid Iqbal Date: Thu, 16 Nov 2023 11:26:43 -0500 Subject: [PATCH 1/4] TESTING infra --- clang/NOTES.txt | 2 ++ 1 file

[clang] Issue #63106: [сlang] Representation of ellipsis in AST (PR #80976)

2024-02-26 Thread Shahid Iqbal via cfe-commits
shahidiqbal13 wrote: Hi @cor3ntin to review the updated fix, will format it later https://github.com/llvm/llvm-project/pull/80976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-26 Thread Artem Belevich via cfe-commits
@@ -1306,15 +1306,68 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-02-26 Thread Daniel Hoekwater via cfe-commits
https://github.com/dhoekwater updated https://github.com/llvm/llvm-project/pull/82662 >From 07316bfed280a3c2ab46864ff1f2d9e50e7b170d Mon Sep 17 00:00:00 2001 From: Daniel Hoekwater Date: Thu, 22 Feb 2024 17:39:15 + Subject: [PATCH] [Driver] Allow -fbasic-block-address-map for AArch64 ELF

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

2024-02-26 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari closed https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-26 Thread via cfe-commits
Author: Slava Zakharin Date: 2024-02-26T10:54:08-08:00 New Revision: 6398baa425349ce67f39aaa67af86ec2aec96c7c URL: https://github.com/llvm/llvm-project/commit/6398baa425349ce67f39aaa67af86ec2aec96c7c DIFF:

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

2024-02-26 Thread Slava Zakharin via cfe-commits
vzakhari wrote: I do not think the Windows CI failure has anything to do with my changes. I am going to merge this. https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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] 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

[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

[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] [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]

[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 , const Expr *S, // Extract the ID of the condition we are setting in the bitmap. const auto = BranchStateIter->second; assert(Branch.ID >= 0 && "Condition has no ID!"); +

[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

[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][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] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -1862,6 +1862,17 @@ class StringLiteral final llvm_unreachable("Unsupported character width!"); } + // Get code unit but preserve sign info. + int64_t getCodeUnitS(size_t I, uint64_t BitWidth) const { Fznamznon wrote: FYI

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

2024-02-26 Thread Balázs Kéri via cfe-commits
@@ -65,12 +65,24 @@ void check_fseek(void) { fclose(fp); } +void check_fseeko(void) { balazske wrote: If we have these null pointer tests for all functions, `vfprintf` and `vfscanf` could be added too. 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
https://github.com/balazske commented: I have only small observations. 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
@@ -5,7 +5,7 @@ // suppressed. #pragma clang system_header -typedef struct __sFILE { balazske wrote: This change looks not needed. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list

[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 , const T *ND, return false; } +static bool CheckC23ConstexprVarType(Sema , SourceLocation VarLoc, + QualType T) { + + if (T->isVariableArrayType()) { +

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

2024-02-26 Thread Haojian Wu via cfe-commits
hokein wrote: > Sorry for missing this! > > Would be nice to have a testcase but I see it's hard to get into the crashing > state (maybe even not possible via clang). Seems worthwhile to be robust to > such conditions and getDefaultArgRange appears less fragile. This fix was needed for the

[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 Felipe de Azevedo Piovezan via cfe-commits
felipepiovezan 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

[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

[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-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

[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] [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 + ///

[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 = -

[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 -

[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 = -

[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 -

[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 = -

[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

[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]

[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

[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 , const PrintingPolicy ) { ThreadStorageClassSpec = TSCS_unspecified; ThreadStorageClassSpecLoc = SourceLocation(); } +if (S.getLangOpts().C23 && +getConstexprSpecifier() ==

[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

[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

[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
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/13] [C23] Implement N3018: The constexpr

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,265 @@ +Pointer Authentication +== + +.. contents:: + :local: + +Introduction + + +Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of

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

2024-02-26 Thread Yaxun Liu 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] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-26 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList

[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 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**?

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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
@@ -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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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

[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 templatetypename T struct C; // Test lookup with incomplete lookup context templatetypename T auto CT::f() - decltype(x) { } ``` An

[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

[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][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

[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] [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

[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

[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] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion %s Fznamznon wrote: Done. https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/65996 >From c5cde09a5ea4a4cfcf3287f7462c38335493c02d Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Wed, 16 Aug 2023 09:17:12 -0700 Subject: [PATCH] [AArch64][PAC] Support and document ptrauth builtins and

[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: -

[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

[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

[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] [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] 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:

[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

[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

[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

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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

[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

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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", , ); + char c = fgetc(F1); // expected-warning {{Read

[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

[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

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

2024-02-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -13823,7 +13869,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { VDecl->setStorageClass(SC_Extern); // C99 6.7.8p4. All file scoped initializers need to be constant. -if (!getLangOpts().CPlusPlus && !VDecl->isInvalidDecl())

[clang] be02430 - Thread safety analysis: provide printSCFG definition. (#80277)

2024-02-26 Thread via cfe-commits
Author: Haojian Wu Date: 2024-02-26T18:24:53+01:00 New Revision: be024307075c37f057fd51d4de0e9c2443b51686 URL: https://github.com/llvm/llvm-project/commit/be024307075c37f057fd51d4de0e9c2443b51686 DIFF: https://github.com/llvm/llvm-project/commit/be024307075c37f057fd51d4de0e9c2443b51686.diff

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-26 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,265 @@ +Pointer Authentication +== + +.. contents:: + :local: + +Introduction + + +Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-02-26 Thread Ahmed Bougacha via cfe-commits
ahmedbougacha wrote: Updated, tried to address all the comments; let me know if I missed something! https://github.com/llvm/llvm-project/pull/65996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] b876596 - [Driver] Improve error when a compiler-rt library is not found (#81037)

2024-02-26 Thread via cfe-commits
Author: Fangrui Song Date: 2024-02-26T09:55:02-08:00 New Revision: b876596a76cdc183439b36455d26883b67f8ee51 URL: https://github.com/llvm/llvm-project/commit/b876596a76cdc183439b36455d26883b67f8ee51 DIFF: https://github.com/llvm/llvm-project/commit/b876596a76cdc183439b36455d26883b67f8ee51.diff

[clang] [Driver] Improve error when a compiler-rt library is not found (PR #81037)

2024-02-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/81037 ___ 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,

[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

[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)`.

  1   2   3   4   5   >