[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread via cfe-commits
@@ -159,11 +263,56 @@ AST_MATCHER_P(DeclRefExpr, doesNotMutateObject, int, Indirections) { // The method call cannot mutate our variable. continue; } + if (isLikelyShallowConst(*Method)) { +// We still have to check that t

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > I don't think that assumption is currently true. I think it's also worth > clarifying what this thing is, and possibly renaming it, because > "unqualified" has C language level meaning that would contradict what it is > here. It's probably optimistic,

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-05 Thread Mariya Podchishchaeva via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

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

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

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

[clang] 289725f - [analyzer] New optin.taint.TaintedAlloc checker for catching unbounded memory allocation calls (#92420)

2024-06-05 Thread via cfe-commits
Author: Daniel Krupp Date: 2024-06-05T16:33:31+02:00 New Revision: 289725f11c579348ec49c8c606de4291314db0d9 URL: https://github.com/llvm/llvm-project/commit/289725f11c579348ec49c8c606de4291314db0d9 DIFF: https://github.com/llvm/llvm-project/commit/289725f11c579348ec49c8c606de4291314db0d9.diff

[clang] [analyzer] New optin.taint.TaintedAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-06-05 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed 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] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-06-05 Thread Akash Banerjee via cfe-commits
TIFitis wrote: @jdoerfert Kind reminder for review. Thanks. https://github.com/llvm/llvm-project/pull/80343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/94388 >From cdf95a804614950167d2d4df227d06a86a70d4bb Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 4 Jun 2024 19:52:28 +0100 Subject: [PATCH] Unqualified `ptr`s should be truly unqualified, and not AS0 ptrs. -

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/94216 >From 94212789ca0b22380de88521279056ffdce5b3e6 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 29 May 2024 11:11:03 +0200 Subject: [PATCH] Support [[guarded_by(mutex)]] and friends attributes ins

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/94216 >From 94212789ca0b22380de88521279056ffdce5b3e6 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 29 May 2024 11:11:03 +0200 Subject: [PATCH 1/2] Support [[guarded_by(mutex)]] and friends attributes

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: > > > > One question I have is whether there will be follow-up work for other > > > > thread safety attributes (`acquire_capability`, > > > > `try_acquire_capability`, etc)? > > > > > > > > > They already work fine in C so far. But if you are aware of some issues > > > don

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
@@ -3330,6 +3340,63 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute(IdentifierInfo &AttrName, + SourceLocation

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: Pushed an additional change on the documentation: the doc was incorrectly stating that ACQUIRED_{AFTER,BEFORE} were not implemented but they are. https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commi

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Anubhab Ghosh via cfe-commits
argentite wrote: > Unfortunately, this PR cannot be tested in the current testing infrastructure > in llvm because it needs a browser to provide a proper execution environment. Just to clarify, we don't need an actual full browser to test it. Nodejs should probably be sufficient for execution.

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-05 Thread via cfe-commits
@@ -5813,6 +5813,23 @@ static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, return TypoCorrection(); } +static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { + if (!isa(Fn)) +return false; + + Fn = Fn->IgnoreParens(); cor3ntin

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-05 Thread via cfe-commits
@@ -3048,10 +3050,12 @@ class OverloadExpr : public Expr { Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier()); Result.IsAddressOfOperand = true; + Result.IsAddressOfOperandWithParen = HasParen; cor3ntin wrote: I added a default

[clang] d0223b9 - [Clang] Static and explicit object member functions with the same parameter-type-lists (#93430)

2024-06-05 Thread via cfe-commits
Author: cor3ntin Date: 2024-06-05T16:50:42+02:00 New Revision: d0223b9ffc40146fb4a948ebfa652dc95499b7ba URL: https://github.com/llvm/llvm-project/commit/d0223b9ffc40146fb4a948ebfa652dc95499b7ba DIFF: https://github.com/llvm/llvm-project/commit/d0223b9ffc40146fb4a948ebfa652dc95499b7ba.diff LOG:

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

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

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

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

[clang] f10e71f - [OpenACC] Implement 'device_type' sema for 'loop' construct

2024-06-05 Thread via cfe-commits
Author: erichkeane Date: 2024-06-05T08:01:35-07:00 New Revision: f10e71f6d80719c47f3eed117120e74d9d3858c1 URL: https://github.com/llvm/llvm-project/commit/f10e71f6d80719c47f3eed117120e74d9d3858c1 DIFF: https://github.com/llvm/llvm-project/commit/f10e71f6d80719c47f3eed117120e74d9d3858c1.diff LO

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @EugeneZelenko Thanks for inviting some additional reviewers. I'll add an entry in the release notes. https://github.com/llvm/llvm-project/pull/94356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Haojian Wu via cfe-commits
hokein wrote: unfortunately, this seems to break an existing test: ``` OK ] InterpreterTest.IncrementalInputTopLevelDecls (66 ms) [ RUN ] InterpreterTest.Errors ClangReplInterpreterTests: /usr/local/google/home/hokein/workspace/llvm-project/clang/lib/Sema/IdentifierResolver.cpp:228:

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl created https://github.com/llvm/llvm-project/pull/94483 None >From 7d64f16e9bdc6b9a195a332a49e5fb9954d5f7c1 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 5 Jun 2024 11:10:41 -0400 Subject: [PATCH] AMDGPU: Add missing gfx* generic targets handling i

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Konstantin Zhuravlyov (kzhuravl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94483.diff 5 Files Affected: - (modified) clang/include/clang/Basic/Cuda.h (+5) - (modified) clang/lib/Basic/Cuda.cpp (+5) - (m

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Konstantin Zhuravlyov (kzhuravl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94483.diff 5 Files Affected: - (modified) clang/include/clang/Basic/Cuda.h (+5) - (modified) clang/lib/Basic/Cuda.cpp (+5) - (modified)

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM. The main change to point out is that the target attribute will no longer accept internal feature names. I don't think it should ever have done so, but we should get input from others. @davemgreen? There are references to existin

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/94279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Tomas Matheson via cfe-commits
@@ -13665,9 +13665,9 @@ QualType ASTContext::getCorrespondingSignedFixedPointType(QualType Ty) const { } // Given a list of FMV features, add each of their backend features to the list. tmatheson-arm wrote: ```suggestion // Given a list of FMV features, ret

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Tomas Matheson via cfe-commits
@@ -48,5 +48,5 @@ int test_versions() { return code(); } // CHECK: attributes #0 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" } -// CHECK: attributes #1 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-b

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Shilei Tian via cfe-commits
@@ -121,6 +121,11 @@ enum class CudaArch { GFX1151, GFX1200, GFX1201, + GFX9_GENERIC, shiltian wrote: I think you might want to group them with corresponding non-generic targets such that we can directly use `>=` and `<=` to compare if a GFX version fa

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-05 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > You can have a project that has both C and C++ implementation files that > > end up including the same header files from the C standard library. One can > > be compiled under C11 (without separator support), the other under C++14 > > (with separator support). > > Thank

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/94216 >From bb2effbaf8e06ae933791d8533c006a6db3aadc9 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 29 May 2024 11:11:03 +0200 Subject: [PATCH] Support [[guarded_by(mutex)]] and friends attributes ins

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Yeoul Na via cfe-commits
rapidsna wrote: > > You may also want to consider making the attribute late parsed in C when > > `-fexperimental-late-parse-attributes` is enabled. See > > https://github.com/llvm/llvm-project/pull/93121/files#diff-ae2ec9524bdbeea1f06917607482634dd89af5bcbb929805032463e5dafe79e7R2260 > > That w

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 created https://github.com/llvm/llvm-project/pull/94488 …er (#93753)" This reverts commit 9862080b1cbf685c0d462b29596e3f7206d24aa2. >From 3bc45673476ae4fbd1166a2d6bff240077104f5e Mon Sep 17 00:00:00 2001 From: Nishith Shah Date: Tue, 4 Jun 2024 09:47:55 -070

[clang] [llvm] [AArch64] set AppleA14 architecture version to v8.4-a (PR #92600)

2024-06-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/92600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nishith Kumar M Shah (nishithshah2211) Changes …er (#93753)" This reverts commit 9862080b1cbf685c0d462b29596e3f7206d24aa2. --- Full diff: https://github.com/llvm/llvm-project/pull/94488.diff 8 Files Affected: - (modified) clang/include

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: Here is the revert PR: https://github.com/llvm/llvm-project/pull/94488 https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/94488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-05 Thread Momchil Velikov via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/94216 >From 0f7d369ac81fd9523e90404c6b863baaf1f6afd9 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 29 May 2024 11:11:03 +0200 Subject: [PATCH] Support [[guarded_by(mutex)]] and friends attributes ins

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: > `-fexperimental-late-parse-attributes` Done > > > You may also want to consider making the attribute late parsed in C when > > > `-fexperimental-late-parse-attributes` is enabled. See > > > https://github.com/llvm/llvm-project/pull/93121/files#diff-ae2ec9524bdbeea1f069176

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/94422 >From 708374e03f1bf70006f2472f19edad1bd621e2d6 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 3 Jun 2024 16:46:36 + Subject: [PATCH] [NVPTX] Revamp NVVMIntrRange pass --- clang/test/CodeGenCUDA/

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-05 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 50d837e3019136aa42a73c06dd117fe6ca8cf148 91706032a89c11861c073c33aebf0a37fee5bfb2 --

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-06-05 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. This patch isn't blocked by libc++, thanks for fixing the incorrect usage. This isn't a review of the patch itself, just unblocking for libcxx-reviewers. https://github.com/llvm/llvm-project/pull/92957 __

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -193,3 +193,8 @@ Options When `true`, the check will warn on an expression like ``sizeof(expr)`` where the expression is a pointer to aggregate. Default is `true`. + +.. option:: WarnOnSizeOfPointer + + When `true`, the check will warn on an expression like ``size

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/94356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. +- LGTM, except nits. https://github.com/llvm/llvm-project/pull/94356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -292,11 +318,17 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) { diag(E->getBeginLoc(), "suspicious usage of 'sizeof(char*)'; do you mean 'strlen'?") << E->getSourceRange(); - } else if (const auto *E = - R

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -193,3 +193,8 @@ Options When `true`, the check will warn on an expression like ``sizeof(expr)`` where the expression is a pointer to aggregate. Default is `true`. + +.. option:: WarnOnSizeOfPointer + + When `true`, the check will warn on an expression like ``size

[clang] [llvm] [AArch64] set AppleA14 architecture version to v8.4-a (PR #92600)

2024-06-05 Thread via cfe-commits
AtariDreams wrote: @jroelofs on a slight tangent, when do we get to add information on the M4 chip? https://github.com/llvm/llvm-project/pull/92600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-06-05 Thread Wei Zhao via cfe-commits
wxz2020 wrote: Any more comments? Otherwise, we will move forward. Thanks, https://github.com/llvm/llvm-project/pull/91022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl updated https://github.com/llvm/llvm-project/pull/94483 >From 7d64f16e9bdc6b9a195a332a49e5fb9954d5f7c1 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 5 Jun 2024 11:10:41 -0400 Subject: [PATCH 1/2] AMDGPU: Add missing gfx* generic targets handling in

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Konstantin Zhuravlyov via cfe-commits
@@ -121,6 +121,11 @@ enum class CudaArch { GFX1151, GFX1200, GFX1201, + GFX9_GENERIC, kzhuravl wrote: Done. https://github.com/llvm/llvm-project/pull/94483 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Oh, we need to adjust https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272 to skip in case of C++... https://github.com/llvm/llvm-project/pull/94471 ___ cfe-commits m

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/94483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2bfa26d - AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (#94483)

2024-06-05 Thread via cfe-commits
Author: Konstantin Zhuravlyov Date: 2024-06-05T11:57:17-04:00 New Revision: 2bfa26d30fb96d77e73be7876d12dd23e768f809 URL: https://github.com/llvm/llvm-project/commit/2bfa26d30fb96d77e73be7876d12dd23e768f809 DIFF: https://github.com/llvm/llvm-project/commit/2bfa26d30fb96d77e73be7876d12dd23e768f8

[clang] AMDGPU: Add missing gfx* generic targets handling in clang (NVPTX, OpenMP runtime) (PR #94483)

2024-06-05 Thread Konstantin Zhuravlyov via cfe-commits
https://github.com/kzhuravl closed https://github.com/llvm/llvm-project/pull/94483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-05 Thread Chris Apple via cfe-commits
@@ -1509,6 +1511,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, AddLinkSanitizerLibArgs(Args, CmdArgs, "asan"); } cjappl wrote: Thanks for catching this! Added a few basic ones that test that the flag is supported, and that s

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I analyzed several open source project with this check to observe the effects of my commit and I was (pleasantly?) surprised to see that it detected some ugly errors (despite the fact that the inputs are stable open source projects...). The following table compares the "old"

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-05 Thread Sander de Smalen via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { sdesmalen-arm wrote: @efriedma-quic I think the issue is that when we emit unwind info that is _not_

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

2024-06-05 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: It looks relatively good, I found only smaller issues. 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-co

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

2024-06-05 Thread Balázs Kéri via cfe-commits
https://github.com/balazske 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-06-05 Thread Balázs Kéri via cfe-commits
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

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

2024-06-05 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. LGTM assuming you will be fixing the buildkite failures. You may still need to wait on @AaronBallman's approval. https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe

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

2024-06-05 Thread Alex Voicu via cfe-commits
@@ -1,4 +1,5 @@ ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - | FileCheck %s AlexVlx wrote: I've rolled back most of these, except for a couple of places where there is a substantive d

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/94279 >From a413428bb0fdcd45b4a251e385b6cc00ff6a0a2c Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 3 Jun 2024 19:57:49 +0100 Subject: [PATCH 1/4] [AArch64] Decouple feature dependency expansion. The

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Alexandros Lamprineas via cfe-commits
@@ -1110,23 +1071,26 @@ ParsedTargetAttr AArch64TargetInfo::parseTargetAttr(StringRef Features) const { bool FoundArch = false; auto SplitAndAddFeatures = [](StringRef FeatString, -std::vector &Features) { +s

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/94279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 471d7a14b6475c4d06365b01ac35847276a464ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory allocat

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: Rebased and updated with a lot more tests. https://github.com/llvm/llvm-project/pull/70306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add B extension (PR #76893)

2024-06-05 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Suppress availability diagnostics for mismatched host/device overloads (PR #93546)

2024-06-05 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Ping. You situation is similar to overloading resolution of functions called in global variable initializer. You may consider using a similar approach as https://reviews.llvm.org/D158247 https://github.com/llvm/llvm-project/pull/93546

[clang] 8407779 - [CUDA] Mark CUDA-12.5 as supported and introduce ptx 8.5. (#94113)

2024-06-05 Thread via cfe-commits
Author: Andrey Portnoy Date: 2024-06-05T10:09:24-07:00 New Revision: 8407779bb7256c320f75913edf07c20c4e4c370a URL: https://github.com/llvm/llvm-project/commit/8407779bb7256c320f75913edf07c20c4e4c370a DIFF: https://github.com/llvm/llvm-project/commit/8407779bb7256c320f75913edf07c20c4e4c370a.diff

[clang] [llvm] [CUDA] Mark CUDA-12.5 as supported and introduce ptx 8.5. (PR #94113)

2024-06-05 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/94113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Haojian Wu via cfe-commits
hokein wrote: > Oh, we need to adjust > https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272 > to skip in case of C++... The link points to an irrelevant project, I assume you mean here https://github.com/llvm/llvm-project/blob

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

2024-06-05 Thread Michal Paszkowski via cfe-commits
@@ -1,4 +1,5 @@ ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - | FileCheck %s michalpaszkowski wrote: I am okay with either approach. I think we can assume that the core functionality w

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-05 Thread David Green via cfe-commits
https://github.com/davemgreen commented: > LGTM. The main change to point out is that the target attribute will no > longer accept internal feature names. I don't think it should ever have done > so, but we should get input from others. @davemgreen? There are references to > existing code in [

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-05 Thread John McCall via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/94508 Match TAPI behavior and allow input headers to be resolved via a passed directory, which is expected to be a library sitting in a build directory. >From c547d990aca29ecfe6f51d37c5c3f8712dfc5e44 Mon Sep 17 00

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Match TAPI behavior and allow input headers to be resolved via a passed directory, which is expected to be a library sitting in a build directory. --- Patch is 34.57 KiB, truncated to 20.00 KiB below, f

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -4656,14 +4656,14 @@ static void InitCatchParam(CodeGenFunction &CGF, auto catchRD = CatchType->getAsCXXRecordDecl(); CharUnits caughtExnAlignment = CGF.CGM.getClassPointerAlignment(catchRD); - llvm::Type *PtrTy = CGF.UnqualPtrTy; // addrspace 0 ok ari

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -51,9 +51,11 @@ struct CodeGenTypeCache { llvm::IntegerType *PtrDiffTy; }; + /// unqualified void* + llvm::PointerType *UnqualPtrTy; arichardson wrote: I'd argue we should just remove this variable, and the few cases that actually want AS0 can cal

[clang] Revert "Pass LangOpts from CompilerInstance to DependencyScanningWork… (PR #94488)

2024-06-05 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @jansvoboda11 - please merge this revert in when you get a chance, thanks! https://github.com/llvm/llvm-project/pull/94488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Commit title needs updating to only refer to used metadata. A few wording suggestions inline. https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -2922,18 +2922,21 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name, if (List.empty()) return; + // We unconditionally use unqualified pointers - this is intentional as these arichardson wrote: ```suggestion // We unconditionally use AS0

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -8642,8 +8642,9 @@ The '``llvm.used``' Global Variable The ``@llvm.used`` global is an array which has :ref:`appending linkage `. This array contains a list of pointers to named global variables, functions and aliases which may optionally -have a pointer cast formed of bitca

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -2047,9 +2047,9 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) { llvm::Type *CtorPFTy = llvm::PointerType::get(CtorFTy, TheModule.getDataLayout().getProgramAddressSpace()); - // Get the type of a ctor entry, { i32, void ()*, i8* }. + /

[clang] [clang][NFC] fix name lookup for llvm::json::Value in SymbolGraphSerializer (PR #94511)

2024-06-05 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/94511 This code uses two namespaces, `llvm` and `llvm::json`. However, we have both `llvm::Value` and `llvm::json::Value`. Whenever any of the headers declare or include `llvm::Value`, the lookup becomes ambigu

<    1   2   3   4   5   >