[clang] 2df06e4 - [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (#90886)

2024-05-14 Thread via cfe-commits
Author: Michael Klemm Date: 2024-05-14T09:01:51+02:00 New Revision: 2df06e42d733a1f7a1cdf715894921a5bbbc2956 URL: https://github.com/llvm/llvm-project/commit/2df06e42d733a1f7a1cdf715894921a5bbbc2956 DIFF: https://github.com/llvm/llvm-project/commit/2df06e42d733a1f7a1cdf715894921a5bbbc2956.diff

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-14 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm closed https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-14 Thread Michael Klemm via cfe-commits
mjklemm wrote: @tblah @banach-space Thanks for the reviews! https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-14 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra edited https://github.com/llvm/llvm-project/pull/78572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-14 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -678,6 +680,50 @@ class SIMemoryLegalizer final : public MachineFunctionPass { bool runOnMachineFunction(MachineFunction &MF) override; }; +static const StringMap ASNames = {{ +{"global", SIAtomicAddrSpace::GLOBAL}, +{"local", SIAtomicAddrSpace::LDS}, +{"imag

[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)

2024-05-14 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra approved this pull request. Looks good to me. But I have no opinion about that discussion with whether "image" should be available for explicit use! https://github.com/llvm/llvm-project/pull/78572 ___ cfe-commits mailing li

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Fangrui Song via cfe-commits
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir", PosFlag, NegFlag LLVM pipeline to compile">, BothFlags<[], [ClangOption, CC1Option], "">>; -def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, +def emit_cir : Flag<["-"], "emit-cir">, Visibility<[C

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add attribute for consteval builtins; Declare constexpr builtins as constexpr in C++ (PR #91894)

2024-05-14 Thread via cfe-commits
@@ -14,13 +14,18 @@ void __builtin_va_copy(double d); // expected-error@+2 {{cannot redeclare builtin function '__builtin_va_end'}} // expected-note@+1 {{'__builtin_va_end' is a builtin with type}} void __builtin_va_end(__builtin_va_list); -// RUN: %clang_cc1 %s -fsyntax-only -

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @ZequanWu thank you for your help, but next time you should disable renaming passes as specified in https://github.com/llvm/llvm-project/pull/89807#issuecomment-2102760018. C-Reduce output can be typically reduced further manually, but it's a pain without names. https://github

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/91445 From d839faf7a30851a172d812137b30635c741870f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 8 May 2024 10:10:24 +0200 Subject: [PATCH 1/6] [clang][analyzer] Add checker 'Security

[clang] fcd020d - [Clang][Sema] Fix malformed AST for anonymous class access in template. (#90842)

2024-05-14 Thread via cfe-commits
Author: martinboehme Date: 2024-05-14T09:45:54+02:00 New Revision: fcd020d561f28a2b33b6cc12a5a0164a6d5e4172 URL: https://github.com/llvm/llvm-project/commit/fcd020d561f28a2b33b6cc12a5a0164a6d5e4172 DIFF: https://github.com/llvm/llvm-project/commit/fcd020d561f28a2b33b6cc12a5a0164a6d5e4172.diff

[clang] [Clang][Sema] Fix malformed AST for anonymous class access in template. (PR #90842)

2024-05-14 Thread via cfe-commits
martinboehme wrote: CI failure (DataFlowSanitizer-x86_64 :: release_shadow_space.c) looks unrelated. Will merge now. @shafik If you have any remaining comments, happy to address those in a followup PR. https://github.com/llvm/llvm-project/pull/90842

[clang] [Clang][Sema] Fix malformed AST for anonymous class access in template. (PR #90842)

2024-05-14 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/90842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-14 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: This is the first time I'm trying to add an attribute, and I think I am missing something. I am adding this part in `Attr.td`: ``` def ClspvLibclcBuiltin: DeclOrStmtAttr { let Spellings = [Clang<"clspv_libclc_builtin">]; let Documentation = [Undocumented]; let SimpleHandle

[clang] [flang] [flang] Add nsw flag to do-variable increment with a new option (PR #91579)

2024-05-14 Thread Yusuke MINATO via cfe-commits
https://github.com/yus3710-fj updated https://github.com/llvm/llvm-project/pull/91579 >From f51cfbe1e50c7a1aa902c684f12a20d0fac39c21 Mon Sep 17 00:00:00 2001 From: Yusuke MINATO Date: Wed, 24 Apr 2024 14:42:21 +0900 Subject: [PATCH 1/3] [flang] Add nsw flag to do-variable increment with a new

[clang] [flang] [flang] Add nsw flag to do-variable increment with a new option (PR #91579)

2024-05-14 Thread Yusuke MINATO via cfe-commits
@@ -34,5 +34,9 @@ ENUM_LOWERINGOPT(NoPPCNativeVecElemOrder, unsigned, 1, 0) /// On by default. ENUM_LOWERINGOPT(Underscoring, unsigned, 1, 1) +/// If true, add nsw flags to arithmetic operations for integer. +/// Off by default. +ENUM_LOWERINGOPT(NoSignedWrap, unsigned, 1, 0)

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-14 Thread Sven van Haastregt via cfe-commits
svenvh wrote: > It allows the source to be parsed, but then I don't see the attribute in the > LLVM IR generated for libclc. You will need to also convert the attribute into an LLVM IR construct (e.g. metadata) in Clang CodeGen. See `CodeGenFunction::EmitKernelMetadata` for inspiration for e

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

2024-05-14 Thread Sam McCall via cfe-commits
sam-mccall wrote: The immediate deprecation causes a few issues: - mechanical: we build with `-Wall -Werror -Wno-deprecated-declarations -Wno-deprecated-other-stuff` in part to catch driver misuse and fix it early. However this warning is not actionable, so now we need `-Wno-deprecated` which

[clang] [lldb] [llvm] [openmp] [polly] fix(python): fix comparison to True/False (PR #91858)

2024-05-14 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/91858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [openmp] [polly] fix(python): fix comparison to True/False (PR #91858)

2024-05-14 Thread David Spickett via cfe-commits
DavidSpickett wrote: If this is split out from the other larger PR, should there be `clang/` changes in here? I've copied your commit message into the PR description, because with the way llvm is setup, we use the PR's description as the commit message for a squashed version of the changes.

[clang] [ClangFormat] Add DiagHandler for getStyle function (PR #91317)

2024-05-14 Thread via cfe-commits
pointhex wrote: @mydeveloperday There is no issue, It is my request. I implemented it without creating an issue or suggestion. Should I? https://github.com/llvm/llvm-project/pull/91317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-05-14 Thread Vikram Hegde via cfe-commits
vikramRH wrote: @yuanfang-chen , any plans to continue with this PR ? https://github.com/llvm/llvm-project/pull/72607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-14 Thread Sebastian Kreutzer via cfe-commits
sebastiankreutzer wrote: Ping https://github.com/llvm/llvm-project/pull/90959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-14 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From 770e7c543b0651b776b2bc23353e85a7f62a695a Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero siz

[clang] [Driver][PS5] Set visibility option defaults (PR #92091)

2024-05-14 Thread via cfe-commits
https://github.com/bd1976bris created https://github.com/llvm/llvm-project/pull/92091 Adjust the PS5 driver defaults for the `-fvisibility-from-dllstorageclass` sub-options so that only globals with dllimport/dllexport annotations are adjusted. This allows globals without dllimport/export to ret

[clang] [Driver][PS5] Set visibility option defaults (PR #92091)

2024-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: bd1976bris (bd1976bris) Changes Adjust the PS5 driver defaults for the `-fvisibility-from-dllstorageclass` sub-options so that only globals with dllimport/dllexport annotations are adjusted. This allows globals without dllimport/export to r

[clang] [Driver][PS5] Set visibility option defaults (PR #92091)

2024-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: bd1976bris (bd1976bris) Changes Adjust the PS5 driver defaults for the `-fvisibility-from-dllstorageclass` sub-options so that only globals with dllimport/dllexport annotations are adjusted. This allows globals without dllimport/expo

[clang] [Driver][PS5] Set visibility option defaults (PR #92091)

2024-05-14 Thread via cfe-commits
@@ -376,24 +382,32 @@ void toolchains::PS4PS5Base::addClangTargetOptions( else CC1Args.push_back("-fvisibility-dllexport=protected"); +// For PS4 we override the visibilty of globals definitions without bd1976bris wrote: Note for reviewer: This

[clang] [Driver][PS5] Set visibility option defaults (PR #92091)

2024-05-14 Thread via cfe-commits
@@ -376,24 +382,32 @@ void toolchains::PS4PS5Base::addClangTargetOptions( else CC1Args.push_back("-fvisibility-dllexport=protected"); +// For PS4 we override the visibilty of globals definitions without +// dllimport or dllexport annotations. if (Driver

[clang] [clang][SPIR-V] Always add convergence intrinsics (PR #88918)

2024-05-14 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/88918 From 440cdfa4132a969702348c32f2810924012c5ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 15 Apr 2024 17:05:40 +0200 Subject: [PATCH 1/6] [clang][SPIR-V] Always add convervence intri

[clang] [clang][SPIR-V] Always add convergence intrinsics (PR #88918)

2024-05-14 Thread Nathan Gauër via cfe-commits
Keenuts wrote: rebased on main, local tests are passing, waiting on CI to merge. https://github.com/llvm/llvm-project/pull/88918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-14 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/92055 >From 6946c9f1285d5a27eafcdbf13f79c0641736198d Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 9 May 2024 12:09:15 -0500 Subject: [PATCH 1/3] Avoiding DeclRefExpr with "non_odr_use_unevaluated" to de

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-14 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/92055 >From 6946c9f1285d5a27eafcdbf13f79c0641736198d Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 9 May 2024 12:09:15 -0500 Subject: [PATCH 1/3] Avoiding DeclRefExpr with "non_odr_use_unevaluate

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1964,39 +1964,55 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXDefaultArgExprClass: case Stmt::CXXDefaultInitExprClass: { Bldr.takeNodes(Pred); - ExplodedNodeSet PreVisit; - getCheckerManager().runCheckersForPreStmt(PreV

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1964,39 +1964,55 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXDefaultArgExprClass: case Stmt::CXXDefaultInitExprClass: { Bldr.takeNodes(Pred); - ExplodedNodeSet PreVisit; - getCheckerManager().runCheckersForPreStmt(PreV

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: In general, this PR looks good to me. I only have some nits inline. If it didn't break anything, it should be good to go. https://github.com/llvm/llvm-project/pull/91879 ___ cfe-commits mailing list cfe-commits@l

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1114,17 +1114,16 @@ void fCXX11MemberInitTest1() { CXX11MemberInitTest1(); } +#ifdef PEDANTIC steakhal wrote: I don't think you need to guard this section of code if you were using `// pedantic-note {{...}}` and `// pedantic-warning {{...}}` in the gua

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1964,39 +1964,55 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXDefaultArgExprClass: case Stmt::CXXDefaultInitExprClass: { Bldr.takeNodes(Pred); - ExplodedNodeSet PreVisit; - getCheckerManager().runCheckersForPreStmt(PreV

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_analyze_cc1 -std=c++14 -verify %s \ +// RUN: %clang_analyze_cc1 -std=c++14 -verify=expected,pedantic %s \ steakhal wrote: You introduced the `pedantic` verify prefix, but never actually used it. https://github.com/llvm/llvm-proj

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #91879)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -1964,39 +1964,55 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::CXXDefaultArgExprClass: case Stmt::CXXDefaultInitExprClass: { Bldr.takeNodes(Pred); - ExplodedNodeSet PreVisit; - getCheckerManager().runCheckersForPreStmt(PreV

[clang] 8fe21fd - [clang][analyzer] Ignore try-statements in UnreachableCode checker (#91675)

2024-05-14 Thread via cfe-commits
Author: Andrew Sukach Date: 2024-05-14T11:57:10+02:00 New Revision: 8fe21fda7469f2fdf83980a2720a15baad74ae4f URL: https://github.com/llvm/llvm-project/commit/8fe21fda7469f2fdf83980a2720a15baad74ae4f DIFF: https://github.com/llvm/llvm-project/commit/8fe21fda7469f2fdf83980a2720a15baad74ae4f.diff

[clang] [clang][analyzer] Ignore try-statements in UnreachableCode checker (PR #91675)

2024-05-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/91675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM. I'd only add some safety barriers for some places, denoted my suggested edits. https://g

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91531 ___ cfe-commits mailing list cfe-commits@lis

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -136,53 +100,49 @@ void ErrnoModeling::checkBeginFunction(CheckerContext &C) const { ASTContext &ACtx = C.getASTContext(); ProgramStateRef State

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -136,53 +100,49 @@ void ErrnoModeling::checkBeginFunction(CheckerContext &C) const { ASTContext &ACtx = C.getASTContext(); ProgramStateRef State

[clang] [flang] [flang] Add nsw flag to do-variable increment with a new option (PR #91579)

2024-05-14 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Looks great to me. Thanks for all of your work on this! https://github.com/llvm/llvm-project/pull/91579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] 58b9564 - [clang][Interp][NFC] Add some assertions

2024-05-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-14T12:26:04+02:00 New Revision: 58b9564d5d12063bb9c662039802ede8df615374 URL: https://github.com/llvm/llvm-project/commit/58b9564d5d12063bb9c662039802ede8df615374 DIFF: https://github.com/llvm/llvm-project/commit/58b9564d5d12063bb9c662039802ede8df615374.diff LO

[clang] 0aa5fa9 - [clang][Interp][NFC] Improve Pointer::print()

2024-05-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-14T12:26:05+02:00 New Revision: 0aa5fa9630d0f4ea707c5b8d5cfa2f4bc8d06a14 URL: https://github.com/llvm/llvm-project/commit/0aa5fa9630d0f4ea707c5b8d5cfa2f4bc8d06a14 DIFF: https://github.com/llvm/llvm-project/commit/0aa5fa9630d0f4ea707c5b8d5cfa2f4bc8d06a14.diff LO

[clang] 5865482 - [clang][Interp][NFC] Don't pass on metadata size for composite arrays

2024-05-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-14T12:26:05+02:00 New Revision: 5865482049872d3ae52ea5559abb9e8f4a1e55e5 URL: https://github.com/llvm/llvm-project/commit/5865482049872d3ae52ea5559abb9e8f4a1e55e5 DIFF: https://github.com/llvm/llvm-project/commit/5865482049872d3ae52ea5559abb9e8f4a1e55e5.diff LO

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commit

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -30,23 +30,20 @@ enum SetPrivilegeFunctionKind { Irrelevant, Setuid, Setgid }; class SetgidSetuidOrderChecker : p

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1011,6 +1011,11 @@ def FloatLoopCounter : Checker<"FloatLoopCounter">, Dependencies<[SecuritySyntaxChecker]>, Docum

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. I think this looks good now. I think to really reach the full potential of this check

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1179,6 +1179,34 @@ security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C) strncpy(buf, "a", 1); // warn } +sec

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,196 @@ +//===-- SetgidSetuidOrderChecker.cpp - check privilege revocation calls ---===// +// +// Part of the LLVM

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91445 ___ cfe-commit

[clang] c1bd688 - [clang][Interp] Fix some dummy-related FIXME comments

2024-05-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-14T12:55:45+02:00 New Revision: c1bd68867497cf6e2f2afdba1a3a2993a47b5856 URL: https://github.com/llvm/llvm-project/commit/c1bd68867497cf6e2f2afdba1a3a2993a47b5856 DIFF: https://github.com/llvm/llvm-project/commit/c1bd68867497cf6e2f2afdba1a3a2993a47b5856.diff LO

[clang] clang-format: Allow open brace with trailing comment (no line break) (PR #89956)

2024-05-14 Thread via cfe-commits
GertyP wrote: Ping https://github.com/llvm/llvm-project/pull/89956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-14 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From d587410660127d372fa35963dd26b97fd133d7c5 Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero siz

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/91531 From 07dc4dd5c60c8a04637cce686b379e195deb5b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 8 May 2024 20:01:57 +0200 Subject: [PATCH 1/6] [analyzer] Refactor recognition of the errno

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM. I haven't checked absolutely everything, rather sampled. It looked correct, and free of copy-paste mistakes. https://github.com/llvm/llvm-project/pull/91635 ___ cfe-commits mailing list cfe-

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -400,17 +400,14 @@ class GenericTaintChecker : public Checker { void taintUnsafeSocketProtocol(const CallEvent &Call, CheckerContext &C) const; - /// Default taint rules are initalized with the help of a CheckerContext to - /// access t

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Balazs Benics via cfe-commits
@@ -572,196 +570,236 @@ void GenericTaintChecker::initTaintRules(CheckerContext &C) const { std::vector>; using TR = GenericTaintRule; - const Builtin::Context &BI = C.getASTContext().BuiltinInfo; - RulesConstructionTy GlobalCRules{ // Sources - {{{"fd

[clang] [analyzer] Refactor recognition of the errno getter functions (PR #91531)

2024-05-14 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/91531

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-14 Thread via cfe-commits
@@ -40,10 +38,8 @@ exit: ; Verify that in the resume part resume call is marked with musttail. ; CHECK-LABEL: @f.resume( -; CHECK: %[[addr2:.+]] = call ptr @llvm.coro.subfn.addr(ptr null, i8 0) -; NOPGO-NEXT: musttail call fastcc void %[[addr2]](ptr null) -; PGO: call void @ll

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-14 Thread via cfe-commits
https://github.com/zmodem edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-14 Thread via cfe-commits
zmodem wrote: I think my patch is a significant improvement, both in terms of simplicity and reliability of the codegen for symmetric transfer, and would like to move forward. @ChuanqiXu9 @mtrofin do you have any further comments? https://github.com/llvm/llvm-project/pull/89751 ___

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/92103 Also changes the behaviour of `__builtin_is_layout_compatible` None of the historic nor the current definition of layout-compatible classes mention anything about base classes (other than implicitly through b

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Also changes the behaviour of `__builtin_is_layout_compatible` None of the historic nor the current definition of layout-compatible classes mention anything about base classes (other than implicitly throug

[clang] [clang-tools-extra] [Clang] Retain the angle loci for invented template parameters of constraints (PR #92104)

2024-05-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/92104 Clangd uses it to determine whether the argument is within the selection range. Fixes https://github.com/clangd/clangd/issues/2033 >From d9c0121067162ffb68bc70b9a0a3f10e0b05674c Mon Sep 17 00:00:00 2001 From: Yo

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 74e133215e7ba9049fb021eb9bbb130347496503 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH] [Clang] Fix definition of layout-compatible to ignore empty cla

[clang] [clang-tools-extra] [Clang] Retain the angle loci for invented template parameters of constraints (PR #92104)

2024-05-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Younan Zhang (zyn0217) Changes Clangd uses it to determine whether the argument is within the selection range. Fixes https://github.com/clangd/clangd/issues/2033 --- Full diff: https://github.com/llvm/llvm-project/pull/92104.diff 3 Fil

[clang] [clang-tools-extra] [Clang] Retain the angle loci for invented template parameters of constraints (PR #92104)

2024-05-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/92104 >From d9c0121067162ffb68bc70b9a0a3f10e0b05674c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 14 May 2024 19:46:20 +0800 Subject: [PATCH 1/2] [Clang] Retain the angle loci for invented template parameter

[clang] [clang-tools-extra] [Clang] Retain the angle loci for invented template parameters of constraints (PR #92104)

2024-05-14 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 31b45a9d0d91cc3a78446ee379abc6f2a365 d9c0121067162ffb68bc70b9a0a3f10e0b05674c --

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Aaron Ballman via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance &CI) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; AaronBallman wrote: > Nit: technically the coding standard does not say that, I believ

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -572,196 +570,236 @@ void GenericTaintChecker::initTaintRules(CheckerContext &C) const { std::vector>; using TR = GenericTaintRule; - const Builtin::Context &BI = C.getASTContext().BuiltinInfo; - RulesConstructionTy GlobalCRules{ // Sources - {{{"fd

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/91635 From 57ad704c30866a7d85f43b016583675e70de8531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 9 May 2024 18:32:57 +0200 Subject: [PATCH 1/2] [analyzer] Clean up list of taint propagation

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/91635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Retain the angle loci for invented template parameters of constraints (PR #92104)

2024-05-14 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/92104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-05-14 Thread Marco Borgeaud via cfe-commits
https://github.com/marco-antognini-sonarsource updated https://github.com/llvm/llvm-project/pull/89657 >From ebc417fe98f1cb0e030ec77c17c0150c3fcca7f9 Mon Sep 17 00:00:00 2001 From: Marco Borgeaud <89914223+marco-antognini-sonarsou...@users.noreply.github.com> Date: Fri, 19 Apr 2024 17:33:22 +02

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Some additional remarks. https://github.com/llvm/llvm-project/pull/87886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/87886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -206,23 +221,42 @@ class StdVariantChecker : public Checker { if (!ThisMemRegion) return; +// Get the first type alternative of the std::variant instance. +assert((ThisSVal.getType(C.getASTContext())->isPointerType() || +ThisSVal.getType(C.getA

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -37,6 +43,19 @@ static SVal conjureOffsetSymbolOnLocation( return Symbol; } +// Update the SVal bound to the Cast expression with the SVal +// bound to the casted expression +static ProgramStateRef updateStateAfterSimpleCast(StmtNodeBuilder& Bldr, NagyDon

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -355,4 +356,38 @@ void nonInlineFunctionCallPtr() { char c = std::get (v); // no-warning (void)a; (void)c; -} \ No newline at end of file +} + +//// +// std::swap for std::variant +//--

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -681,6 +681,37 @@ ExprEngine::processRegionChanges(ProgramStateRef state, LCtx, Call); } +ProgramStateRef +ExprEngine::handleCastingBeforeEvalCall(ExplodedNode *Pred, const Expr *Ex, +

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -602,6 +619,37 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred, ExplodedNode *UpdatedN = N; SVal InitVal = state->getSVal(InitEx, LC); + // The call expression to which we have bound something is hidden behind + // an implicit

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -51,27 +47,29 @@ removeInformationStoredForDeadInstances(const CallEvent &Call, } template -void handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C, +bool handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C,

[clang] [analyzer] Variant checker bindings (PR #87886)

2024-05-14 Thread Donát Nagy via cfe-commits
@@ -37,6 +43,19 @@ static SVal conjureOffsetSymbolOnLocation( return Symbol; } +// Update the SVal bound to the Cast expression with the SVal +// bound to the casted expression +static ProgramStateRef updateStateAfterSimpleCast(StmtNodeBuilder& Bldr, +

[clang-tools-extra] [clang-tidy] Rename out-of-line function definitions (PR #91954)

2024-05-14 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/91954 >From ffcc0bfc29b577fd727bc00a912e4c0eb515628a Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Mon, 15 Apr 2024 09:38:48 -0400 Subject: [PATCH] [clang-tidy] Rename out-of-line function definitions Member function

[clang-tools-extra] [clang-tidy] Rename out-of-line function definitions (PR #91954)

2024-05-14 Thread Edwin Vane via cfe-commits
@@ -123,6 +123,9 @@ static const NamedDecl *getFailureForNamedDecl(const NamedDecl *ND) { if (const auto *Method = dyn_cast(ND)) { if (const CXXMethodDecl *Overridden = getOverrideMethod(Method)) Canonical = cast(Overridden->getCanonicalDecl()); +else if (const

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Thanks for everyone's input so far. Let me try to summarize discussions in > this PR so we can set on an approach and give advice to our CIR community > (and encode on our webpage) on how to move forward in upcoming patches. > Useful resources: > > * [LLVM Coding Sta

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix alpha.unix.BlockI

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From ca7be03d939d3375e9075fc287393d3b5e5a2c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix alpha.unix.BlockI

[clang-tools-extra] cc54129 - Add option to exclude headers from clang-tidy analysis (#91400)

2024-05-14 Thread via cfe-commits
Author: Justin Cady Date: 2024-05-14T08:48:04-04:00 New Revision: cc54129b983799e1aaea77aa0ff3040dc30cbc8c URL: https://github.com/llvm/llvm-project/commit/cc54129b983799e1aaea77aa0ff3040dc30cbc8c DIFF: https://github.com/llvm/llvm-project/commit/cc54129b983799e1aaea77aa0ff3040dc30cbc8c.diff L

  1   2   3   4   >