[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/93454 add_clang_library() will create a library clangFoo that depends on objlib obj.clangFoo. Then clang_target_link_libraries() will add a clang-cpp dependency to clangFoo, but obj.clangFoo will instead get dependencies

[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes add_clang_library() will create a library clangFoo that depends on objlib obj.clangFoo. Then clang_target_link_libraries() will add a clang-cpp dependency to clangFoo, but obj.clangFoo will instead get depende

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,171 @@ +//===--- NullCheckAfterDereferenceCheck.cpp - clang-tidy---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From 98ae27a0d303252a23891b204df18112a846f661 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with parame

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

2024-05-27 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh closed 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] 7a28a5b - [clang][Sema] Fix crash when diagnosing candidates with parameter packs (#93079)

2024-05-27 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-05-27T12:18:15+02:00 New Revision: 7a28a5b3fee6c78ad59af79a3d03c00db153c49f URL: https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f DIFF: https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f.dif

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/93079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/90824 >From ff4658cf7661003d940452251147ee58315c774c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 May 2024 12:11:18 +0900 Subject: [PATCH 1/7] Add support for getelementptr nusw and nuw --- llvm/docs/LangRef

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-27 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @kimgr The linked code seems to only be concerned with the `SourceLocation` of the `Decl` (which should be the same `SourceLocation` returned by `Decl::getLocation`), and the template arguments as written (which can be accessed via `getTemplateArgsAsWritten` per this patch).

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,330 @@ +// RUN: %check_clang_tidy %s bugprone-null-check-after-dereference %t + +struct S { + int a; +}; + +int warning_deref(int *p) { + *p = 42; + + if (p) { +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: pointer value is checked even though it cannot be null at

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-27 Thread Kim Gräsman via cfe-commits
kimgr wrote: @sdkrystian Thank you! I think there's some more subtleties to it, but I don't really have my head around it yet. I'll first try to understand what we're trying to achieve and then ping back of I need help with something concrete. https://github.com/llvm/llvm-project/pull/81642 __

[clang] [Clang] Only non-overloaded dereference expressions are lvalues (PR #93457)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93457 Fix a regression introduced by #88740 Fixes #92275 >From 437558af94c8e59a98b26f23fabd4850c2da7131 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 13:07:50 +0200 Subject: [PATCH] [Clang] On

[clang] [Clang] Only non-overloaded dereference expressions are lvalues (PR #93457)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Fix a regression introduced by #88740 Fixes #92275 --- Full diff: https://github.com/llvm/llvm-project/pull/93457.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (modified) clan

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void TextNodeDumpe

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

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

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -599,7 +599,47 @@ Warns when a nullable pointer is returned from a function that has _Nonnull retu optin ^ -Checkers for portability, performance or coding style specific rules. +Checkers for portability, performance, optional security and coding style specific rules.

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Oops, I noticed that I had some minor review commits that were left in a "Pending" state for at least a week. Anyway, I'm publishing them now. https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits mail

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -36,6 +36,8 @@ def CoreAlpha : Package<"core">, ParentPackage; // Note: OptIn is *not* intended for checkers that are too noisy to be on by // default. Such checkers belong in the alpha package. def OptIn : Package<"optin">; +def TaintOptIn : Package<"taint">, ParentPackage;

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -452,6 +454,7 @@ def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">, } // end "optin.core" + NagyDonat wrote: Remove this irrelevant empty line. https://github.com/llvm/llvm-project/pull/92420 ___ c

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -625,6 +628,16 @@ def BlockInCriticalSectionChecker : Checker<"BlockInCriticalSection">, } // end "alpha.unix" +let ParentPackage = TaintOptIn in { NagyDonat wrote: Is this the right place for this? I'd guess that this should be placed next to other `op

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

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

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
martinboehme wrote: > gentle ping @martinboehme @gribozavr Sorry, I didn't notice your original comment that this is ready for review again. I've added a few individual comments, but I haven't reviewed the whole PR in depth because I see that there are still quite a number of old comments tha

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

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

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,112 @@ +//===-- NullPointerAnalysisModel.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,112 @@ +//===-- NullPointerAnalysisModel.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-05-27 Thread via cfe-commits
@@ -0,0 +1,786 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [C++20] [Modules] Don't record implicitly declarations to BMI by default (PR #93459)

2024-05-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/93459 I found we may insert unused implciit declarations like AArch SVE declarations by default on AArch64 due to we will insert that by default. But it should be completely redundant and this patch tries to remove

[clang] [C++20] [Modules] Don't record implicitly declarations to BMI by default (PR #93459)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes I found we may insert unused implciit declarations like AArch SVE declarations by default on AArch64 due to we will insert that by default. But it should be completely redundant and this patch tries

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93460 Regression in clang 18 introduced by af4751738db89a1 Fixes #93456 >From 3da162c93cbb75025e8283132fdcd20d740982a9 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 13:30:50 +0200 Subject: [PA

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Regression in clang 18 introduced by af4751738db89a1 Fixes #93456 --- Full diff: https://github.com/llvm/llvm-project/pull/93460.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modif

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! LG modulo one nit. https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
@@ -797,6 +797,8 @@ Bug Fixes to C++ Support in dependent contexts. Fixes (#GH92680). - Fixed a crash when diagnosing failed conversions involving template parameter packs. (#GH93076) +- Fixed a regression introduced in Clang 18 causing a static function overloading a non-

[clang] 4447461 - [clang][Interp] Don't try to dereference a null type

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T12:59:25+02:00 New Revision: 4447461bc4802d4ead02db61c5276c142df3fd0c URL: https://github.com/llvm/llvm-project/commit/4447461bc4802d4ead02db61c5276c142df3fd0c DIFF: https://github.com/llvm/llvm-project/commit/4447461bc4802d4ead02db61c5276c142df3fd0c.diff LO

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/93460 >From 3da162c93cbb75025e8283132fdcd20d740982a9 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 27 May 2024 13:30:50 +0200 Subject: [PATCH 1/2] [Clang] Correctly diagnose a static function overloading a

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
https://github.com/pasko edited https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

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

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for publishing this commit, it's a nice refinement of the modelling capabilities, and mostly LGTM. In the inline comments I added some very minor remarks and one question about the handling of a `fread` that reads into the beginning of an array re

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the pla

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -937,8 +990,21 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc, // At read, invalidate the buffer in any case of error or success, // except if EOF was already present. - if (IsFread && !E.isStreamEof()) -State = escapeArgs(State, C, Call, {0}); +

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the pla

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,328 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#define EOF (-1) + +extern "C" { +typedef __typeof(sizeof(int)) size_t; +typedef struct _FILE FILE;

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

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

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-27 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/93461 We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anyway. Using the visitor not only eliminates the explicit traversal logic but also allows us to introd

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (martinboehme) Changes We previously had a hand-rolled recursive traversal here that was exactly what `RecursiveASTVistor` does anyway. Using the visitor not only eliminates the explicit traversal lo

[clang] 0183b58 - [Clang] Correctly diagnose a static function overloading a non-static function (#93460)

2024-05-27 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-27T14:17:10+02:00 New Revision: 0183b58e292d9d7004fabc92bd0da10eba5666db URL: https://github.com/llvm/llvm-project/commit/0183b58e292d9d7004fabc92bd0da10eba5666db DIFF: https://github.com/llvm/llvm-project/commit/0183b58e292d9d7004fabc92bd0da10eba5666db.diff LOG:

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

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

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions | FileCheck %s pasko wrote: Done. https://github.com/llvm/llvm-project/pull/92171 ___

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Youngsuk Kim via cfe-commits
@@ -5897,6 +5897,16 @@ void Sema::diagnoseTypo(const TypoCorrection &Correction, NamedDecl *ChosenDecl = Correction.isKeyword() ? nullptr : Correction.getFoundDecl(); + + // For builtin functions which aren't declared anywhere in source, + // don't emit the "declared

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1,25 +1,13 @@ // RUN: %clang_cc1 -pg -triple powerpc-ibm-aix7.2.0.0 -emit-llvm %s -o - | FileCheck %s pasko wrote: Done. https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang][Sema] Don't emit 'declared here' note for builtin functions with no decl in source (PR #93394)

2024-05-27 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/93394 >From 00c93043fca8f8a1f20634ea1b281c60926bd571 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 25 May 2024 20:42:43 -0500 Subject: [PATCH 1/4] [clang][Sema] Don't emit 'declared here' note for builtin fun

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
https://github.com/pasko updated https://github.com/llvm/llvm-project/pull/92171 >From df3f8dfc47cd8d7b220ed712dc7c2cab1c563f50 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Mon, 6 May 2024 19:48:59 +0200 Subject: [PATCH 01/12] wip: Move instrumentation passes This change is not ready for lan

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
https://github.com/zyctree updated https://github.com/llvm/llvm-project/pull/92743 >From 5441c0cc74c3f75e732a797701a894877057df4c Mon Sep 17 00:00:00 2001 From: zyctree Date: Mon, 27 May 2024 20:38:34 +0800 Subject: [PATCH] [clang][CodeComplete] Omit ExplicitObject when completing code Fixes

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
https://github.com/zyctree updated https://github.com/llvm/llvm-project/pull/92743 >From 7fe1ea0dd38d70515bd2075d572539823931b692 Mon Sep 17 00:00:00 2001 From: zyctree Date: Mon, 27 May 2024 20:44:13 +0800 Subject: [PATCH] [clang][CodeComplete] Omit ExplicitObject when completing code Fixes

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Mattan Elkaim via cfe-commits
https://github.com/mattanelkaim created https://github.com/llvm/llvm-project/pull/93467 Swapped code blocks of parameter and variable, which have been confused >From ec5fb34d5df2b82d0fef468b413fb0422311ecc5 Mon Sep 17 00:00:00 2001 From: Mattan Elkaim <73639004+mattanelk...@users.noreply.github

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Mattan Elkaim (mattanelkaim) Changes Swapped code blocks of parameter and variable, which have been confused --- Full diff: https://github.com/llvm/llvm-project/pull/93467.diff 1 Files Affected

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Mattan Elkaim via cfe-commits
https://github.com/mattanelkaim edited https://github.com/llvm/llvm-project/pull/93467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Balázs Kéri via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the pla

[clang] [Clang] Only non-overloaded dereference expressions are lvalues (PR #93457)

2024-05-27 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-27 Thread via cfe-commits
zyctree wrote: @kadircet ok, i added a test in [clang/test/CodeCompletion/member-access.cpp](https://github.com/llvm/llvm-project/pull/92743/files#diff-cf5f20cb8625bb041565f64089a94ed2b89363464b1c55ba31730fe6bf4a9c4f) https://github.com/llvm/llvm-project/pull/92743 _

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/93467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-27 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The problem here is the loss of the qualification on the TemplateNames > > This patch fixes the problem, without taking any workarounds: #93433 > > It also doesn't cause any change in diagnostics in > `clang/test/SemaTemplate/typename-specifier-3.cpp`. I think we should report

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Balázs Kéri via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the pla

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Balázs Kéri via cfe-commits
@@ -937,8 +990,21 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc, // At read, invalidate the buffer in any case of error or success, // except if EOF was already present. - if (IsFread && !E.isStreamEof()) -State = escapeArgs(State, C, Call, {0}); +

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-27 Thread via cfe-commits
@@ -1329,6 +1341,100 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -717,18 +717,71 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +/// Invalidate only the requested elements instead of the whole buffer. +/// This is basically a refinement of the more generic 'escapeArgs' or +/// the pla

[clang] b1e329a - [clang][Interp][NFC] Explicitly define PrimType values

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T15:43:11+02:00 New Revision: b1e329a3f54fbe55fa61c124f94cc6c8509e5423 URL: https://github.com/llvm/llvm-project/commit/b1e329a3f54fbe55fa61c124f94cc6c8509e5423 DIFF: https://github.com/llvm/llvm-project/commit/b1e329a3f54fbe55fa61c124f94cc6c8509e5423.diff LO

[clang] 6a197b3 - [clang][Interp] Fix returning references to functions

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T15:43:12+02:00 New Revision: 6a197b35db0805e77d5103382b5b516ca0c2db1d URL: https://github.com/llvm/llvm-project/commit/6a197b35db0805e77d5103382b5b516ca0c2db1d DIFF: https://github.com/llvm/llvm-project/commit/6a197b35db0805e77d5103382b5b516ca0c2db1d.diff LO

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

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/91057 >From 487ec3df346924f71b66e5753c844c97991e Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH 1/2] [Clang] Throw error when calling atomic with pointer to zero size

[clang] 21ee278 - [Clang] Issue an error when an atomic builtin is called with a pointer to a zero-size object (#91057)

2024-05-27 Thread via cfe-commits
Author: Hendrik Hübner Date: 2024-05-27T15:49:28+02:00 New Revision: 21ee27877a87185199d150f9a49f2d3337bad86e URL: https://github.com/llvm/llvm-project/commit/21ee27877a87185199d150f9a49f2d3337bad86e DIFF: https://github.com/llvm/llvm-project/commit/21ee27877a87185199d150f9a49f2d3337bad86e.diff

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

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/91057 ___ 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-27 Thread via cfe-commits
github-actions[bot] wrote: @HendrikHuebner Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] 5e140c8 - [Clang] [NFC] Clarify assume diagnostic (#93077)

2024-05-27 Thread via cfe-commits
Author: Sirraide Date: 2024-05-27T15:58:58+02:00 New Revision: 5e140c8a17889a4cc677edee9f5db618dca70535 URL: https://github.com/llvm/llvm-project/commit/5e140c8a17889a4cc677edee9f5db618dca70535 DIFF: https://github.com/llvm/llvm-project/commit/5e140c8a17889a4cc677edee9f5db618dca70535.diff LOG:

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

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

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-27 Thread via cfe-commits
Sirraide wrote: ping https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 49b760f - [clang][Interp] Fix calling virtual CXXOperatorCallExprs

2024-05-27 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-27T16:01:30+02:00 New Revision: 49b760ff2c7da60f4308708f56688ca99874605f URL: https://github.com/llvm/llvm-project/commit/49b760ff2c7da60f4308708f56688ca99874605f DIFF: https://github.com/llvm/llvm-project/commit/49b760ff2c7da60f4308708f56688ca99874605f.diff LO

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-27 Thread Dana Jansens via cfe-commits
danakj wrote: Thanks, this is very good https://github.com/llvm/llvm-project/pull/93077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-27 Thread Fanbo Meng via cfe-commits
fanbo-meng wrote: @uweigand ping for review :) https://github.com/llvm/llvm-project/pull/91384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-27 Thread via cfe-commits
https://github.com/zmodem commented: > In commit > https://github.com/llvm/llvm-project/commit/0a20f5417c9d241f4774a49da6c7ca8123686671, > "Better codegen support for DLL attributes being dropped after the first > declaration (PR20792)", code was added to enable "dropping" of DLL attributes.

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-27 Thread Alex Voicu via cfe-commits
AlexVlx wrote: @bader @asudarsa @michalpaszkowski any opinions from the SPIRV side? I would like to merge this so as to be able to progress some related work, but I'd rather not squat on SPIRV real-estate without an ACK from the landlords:) https://github.com/llvm/llvm-project/pull/89796 _

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/92420 >From 80767176cbe8e5717c5f42b113f305d81b635cb9 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 30 Apr 2024 15:20:52 +0200 Subject: [PATCH 1/3] [analyzer] Adding taint analysis capability to unix.Malloc che

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

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

[clang] [Sema] Fix an out-of-bounds crash when diagnosing bad conversion for a function with a parameter pack. (PR #92721)

2024-05-27 Thread Haojian Wu via cfe-commits
hokein wrote: The crash is already fixed by https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f https://github.com/llvm/llvm-project/pull/92721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/93482 Call `DiagnoseUnexpandedParameterPack` when we parse an expression argument to an attribute and check for implicit code in the `CollectUnexpandedParameterPacksVisitor` so we can actually find unexpanded packs

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Call `DiagnoseUnexpandedParameterPack` when we parse an expression argument to an attribute and check for implicit code in the `CollectUnexpandedParameterPacksVisitor` so we can actually find unexpanded packs in a

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-27 Thread Egor Pasko via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(

[clang-tools-extra] 5fb3830 - [clang-tools-extra] Remove redundant FOLDER property. NFC.

2024-05-27 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2024-05-27T17:42:32+02:00 New Revision: 5fb38307f372555cd22fd09ace86c3b1ccd2abb9 URL: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9 DIFF: https://github.com/llvm/llvm-project/commit/5fb38307f372555cd22fd09ace86c3b1ccd2abb9.diff

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/93482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Only non-overloaded dereference expressions are lvalues (PR #93457)

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

[clang] 48c988c - [Clang] Only non-overloaded dereference expressions are lvalues (#93457)

2024-05-27 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-27T17:46:01+02:00 New Revision: 48c988cfcbb25243700178bad43d106ae7ef2cb4 URL: https://github.com/llvm/llvm-project/commit/48c988cfcbb25243700178bad43d106ae7ef2cb4 DIFF: https://github.com/llvm/llvm-project/commit/48c988cfcbb25243700178bad43d106ae7ef2cb4.diff LOG:

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
@@ -1730,6 +1721,21 @@ def UnixAPIPortabilityChecker : Checker<"UnixAPI">, } // end optin.portability + +//===--===// +// Taint checkers. +//===

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Have you considered applying the same heuristic to C++ array new allocations? Actually, I'm almost certain that this patch already affects the C++ array new allocations, because `MallocMemAux` is called from the callback which handles the array new operator. @dkrupp Please

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-27 Thread Aaron Siddhartha Mondal via cfe-commits
aaronmondal wrote: @gulfemsavrun The file `terminal.c` that is causing this linker error is not in LLVM but in `libedit`. The configure step doesn't find `libedit`: ``` Not searching for unused variables given on the command line. -- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit

<    1   2   3   >