[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-09-02 Thread Ilya Biryukov via cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor { // // If it's an enum constant, it must be due to prior decl. Report references // to it when qualifier isn't a type. -if (llvm::isa(FD)) { - if (!DRE->getQualifier() || DRE->getQualifier(

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-09-02 Thread via cfe-commits
@@ -6504,29 +6504,22 @@ static void collectViableConversionCandidates(Sema &SemaRef, Expr *From, QualType ToType, UnresolvedSetImpl &ViableConversions, OverloadCandidateSet &CandidateSet) { - for (unsigned I =

[clang] [clang][analyzer] Add more notes to PointerSubChecker (PR #102432)

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

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-02 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/103917 >From eee57bcc211a8a045c0102ebb2f4410d52d657f6 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 14 Aug 2024 05:56:18 -0700 Subject: [PATCH 1/3] [clang][C23] Support N3029 Improved Normal Enum

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-02 Thread Mariya Podchishchaeva via cfe-commits
@@ -125,6 +125,8 @@ C2y Feature Support C23 Feature Support ^^^ +- Clang now supports `N3029 `_ Improved Normal Enumerations. Fznamznon wrote: Good catch, thanks! https://github.co

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-02 Thread Mariya Podchishchaeva via cfe-commits
@@ -19474,11 +19474,12 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, // representable as an int. // Complain if the value is not representable in an int. - if (!isRepresentableIntegerValue(Context, EnumVal, Context.IntTy)) -

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-02 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Please fix the diagnostics in pre-C23 mode to mention that we're following > C23 rules. Sure, done. https://github.com/llvm/llvm-project/pull/103917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/106982 SValBuilder used to early exit when we did binary operations when one of the operands was a LazyCompoundVal. Riding on the new docs patch (#97407), this patch extracts the actual value behind the LazyCompound

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Kristóf Umann (Szelethus) Changes SValBuilder used to early exit when we did binary operations when one of the operands was a LazyCompoundVal. Riding on the new docs patch (#97407), this patch extracts the actual value b

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/106982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-02 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/97308 >From e6ee9bef17ca8c597f816661f5bdf16eb5a6a982 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 7 Aug 2024 22:55:40 +0800 Subject: [PATCH 1/6] Reapply "[Clang][CWG1815] Support lifetime extension of temporary

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

2024-09-02 Thread via cfe-commits
@@ -750,8 +750,33 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; - - ExprResult DIE = SemaRef.BuildCXXDefaultInitExpr(Loc, Field); + ExprResult DIE; +

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

2024-09-02 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/97308 >From e6ee9bef17ca8c597f816661f5bdf16eb5a6a982 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 7 Aug 2024 22:55:40 +0800 Subject: [PATCH 1/7] Reapply "[Clang][CWG1815] Support lifetime extension of temporary

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

2024-09-02 Thread via cfe-commits
@@ -750,8 +750,33 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; - - ExprResult DIE = SemaRef.BuildCXXDefaultInitExpr(Loc, Field); + ExprResult DIE; +

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

2024-09-02 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-02 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/97308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-02 Thread via cfe-commits
@@ -750,8 +750,33 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; - - ExprResult DIE = SemaRef.BuildCXXDefaultInitExpr(Loc, Field); + ExprResult DIE; +

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

2024-09-02 Thread via cfe-commits
@@ -750,8 +750,33 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; - - ExprResult DIE = SemaRef.BuildCXXDefaultInitExpr(Loc, Field); + ExprResult DIE; +

[clang] [clang][OpenMP] `masked` and `master` are not capturing (PR #106787)

2024-09-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/106787 >From 053374ee88af47515a54e5c5ba3b680e252862bf Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 30 Jul 2024 15:02:38 -0500 Subject: [PATCH] [clang][OpenMP] `masked` and `master` are not capturing

[clang] [clang][OpenMP] Simplify handling of implicit DSA/mapping information (PR #106786)

2024-09-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/106786 >From 92e82b249836b4f17d1e13a927ca3e8300f671ee Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Fri, 30 Aug 2024 13:57:13 -0500 Subject: [PATCH] [clang][OpenMP] Simplify handling of implicit DSA/mapping

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang-tools-extra] b47d7ce - [clangd] Update TidyFastChecks for release/19.x (#106354)

2024-09-02 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-09-02T15:25:26+02:00 New Revision: b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2 URL: https://github.com/llvm/llvm-project/commit/b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2 DIFF: https://github.com/llvm/llvm-project/commit/b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2.dif

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

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

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-09-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet milestoned https://github.com/llvm/llvm-project/pull/106354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-09-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: /cherry-pick b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2 https://github.com/llvm/llvm-project/pull/106354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-09-02 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#106989 https://github.com/llvm/llvm-project/pull/106354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VCIX] Add vcix_state to GNU inline assembly register set (PR #106914)

2024-09-02 Thread Kito Cheng via cfe-commits
kito-cheng wrote: > Do you mean change the current vcix_state register to sf.vcix_state? Yes, because it's SiFive specific register, other vendor may add other status register like VCIX in future, so I would like to add prefix to make sure all further similar stuff will follow same rule if pos

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-09-02 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/100347 >From 4cbec87032166083624251f868ab1c60a7a266b4 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 24 Jul 2024 11:16:20 + Subject: [PATCH 1/3] [AArch64] Implement NEON vscale intrinsics --- clang/includ

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-09-02 Thread via cfe-commits
@@ -5985,6 +5985,27 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +// As above, but only floating point elements supported. Lukacma wrote: Reverted https://github.com/llvm/llvm-pro

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-09-02 Thread via cfe-commits
@@ -2096,3 +2096,9 @@ let ArchGuard = "defined(__aarch64__) || defined(__arm64ec__)", TargetGuard = "r def VLDAP1_LANE : WInst<"vldap1_lane", ".(c*!).I", "QUlQlUlldQdPlQPl">; def VSTL1_LANE : WInst<"vstl1_lane", "v*(.!)I", "QUlQlUlldQdPlQPl">; } + +let ArchGuard = "define

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-09-02 Thread via cfe-commits
@@ -5985,6 +5984,27 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +// As above, but only floating point elements supported. +let mayRaiseFPException = 1, Uses = [FPCR] in +multiclass SIMDThreeVectorF

[clang] [llvm] [RISCV][VCIX] Add vcix_state to GNU inline assembly register set (PR #106914)

2024-09-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: > > Do you mean change the current vcix_state register to sf.vcix_state? > > Yes, because it's SiFive specific register, other vendor may add other status > register like VCIX in future, so I would like to add prefix to make sure all > further similar stuff will follow same rule

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-09-02 Thread Jakub Jelínek via cfe-commits
@@ -125,6 +137,25 @@ class TypeDescriptor { return 1 << (TypeInfo >> 1); } + const char *getBitIntBitCountPointer() const { +DCHECK(isBitIntTy()); +DCHECK(isSignedBitIntTy()); +// Scan Name for zero and return the next address +const char *p = getTypeNam

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-09-02 Thread via cfe-commits
https://github.com/dmasloff updated https://github.com/llvm/llvm-project/pull/106145 >From 219424f9cd3477d9290c8766eaa857234a1ae387 Mon Sep 17 00:00:00 2001 From: dmasloff Date: Mon, 26 Aug 2024 22:11:05 +0300 Subject: [PATCH 1/2] [clang-format] Add new option: WrapNamespaceBodyWithNewlines -

[clang] [clang][AST] Make ASTContext::UnwrapSimilar{Array,}Types const (PR #106992)

2024-09-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106992 They don't mutate the context at all, so mark them const. >From 152d50f0f842f058cb68b7dfed563fd6f55b32a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Sep 2024 15:50:56 +0200 Subjec

[clang] [clang][AST] Make ASTContext::UnwrapSimilar{Array,}Types const (PR #106992)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes They don't mutate the context at all, so mark them const. --- Full diff: https://github.com/llvm/llvm-project/pull/106992.diff 2 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+2-2) -

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/106658 >From ac3265781bb9c2d7422ec761e1b5f703dcdd407b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 29 Aug 2024 20:36:05 -0700 Subject: [PATCH] [TableGen] Add const variants of accessors for backend Split Reco

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/106658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Make ASTContext::UnwrapSimilar{Array,}Types const (PR #106992)

2024-09-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106992 >From b886f4aa5e6cab7e0105c2d415b21dfe614b5010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Sep 2024 15:50:56 +0200 Subject: [PATCH] [clang][AST] Make ASTContext::UnwrapSimilar{Arra

[clang] [clang][AST] Make ASTContext::UnwrapSimilar{Array,}Types const (PR #106992)

2024-09-02 Thread Timm Baeder via cfe-commits
tbaederr wrote: ... and `hasSimilarType`. https://github.com/llvm/llvm-project/pull/106992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-02 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/101603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-02 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/101603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-02 Thread Phoebe Wang via cfe-commits
@@ -153,7 +163,8 @@ const X86InstrFMA3Group *llvm::getFMA3Group(unsigned Opcode, uint64_t TSFlags) { ((TSFlags & X86II::EncodingMask) == X86II::EVEX && ((TSFlags & X86II::OpMapMask) == X86II::T8 || (TSF

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-09-02 Thread Jakub Jelínek via cfe-commits
jakubjelinek wrote: I'm not suggesting to encode the number of limbs anywhere, I'm suggesting encoding the bit precision of a limb somewhere. And the limb ordering. On little endian of bits in a limb and little endian ordering of limbs in the limb array, at least if the limbs are sane (have pr

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-09-02 Thread via cfe-commits
https://github.com/SpencerAbson approved this pull request. Thanks, LGTM. https://github.com/llvm/llvm-project/pull/100347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4a505e1 - [clang] Add tests for CWG issues about friend declaration matching (#106117)

2024-09-02 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-09-02T18:20:44+04:00 New Revision: 4a505e15e768011e47101cf9aeb0c7787fdc9acf URL: https://github.com/llvm/llvm-project/commit/4a505e15e768011e47101cf9aeb0c7787fdc9acf DIFF: https://github.com/llvm/llvm-project/commit/4a505e15e768011e47101cf9aeb0c7787fdc9acf.

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4752 Here is the relevant piece of the build log for

[clang] [libclc] [llvm] [libclc] More cross compilation fixes (PR #97811)

2024-09-02 Thread Harald van Dijk via cfe-commits
hvdijk wrote: ping https://github.com/llvm/llvm-project/pull/97811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/106997 Fixes #106372 >From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 12:11:28 +0200 Subject: [PATCH] [clang] Respect the lifetimebound in user-defined ope

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes Fixes #106372 --- Full diff: https://github.com/llvm/llvm-project/pull/106997.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/lib/Sema/CheckExprLifetime.cpp (+42-23)

[clang] [clang][AST][NFC] Make ASTContext::UnwrapSimilar{Array, }Types const (PR #106992)

2024-09-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/106992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-02 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee Message-ID: In-Reply-To: https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/104512 >From d54f01fe6c49131a3ff4514520e5270889b9affb Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 15 Aug 2024 14:03

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-02 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee Message-ID: In-Reply-To: dmpolukhin wrote: > I am curious about your real project, is it open source? Unfortunately, it is not an open source project but we use bunch of OSS libraries like Folly, Thrift and many other so I see bugs th

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure is unrelated. https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread Gábor Horváth via cfe-commits
@@ -968,6 +972,23 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath &Path) { return false; } +static bool isAssginmentOperatorLifetimeBound(CXXMethodDecl *CMD) { + if (!CMD) +return false; + assert(CMD->getOverloadedOperator() == OverloadedOperatorKind::OO_Eq

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -538,7 +541,8 @@ ProgramStateRef CStringChecker::checkInit(CheckerContext &C, OS << ") in the "; printIdxWithOrdinalSuffix(OS, Buffer.ArgumentIndex + 1); OS << " argument is undefined"; -emitUninitializedReadBug(C, State, Buffer.Expression, OS.str()); +em

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

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

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: First part of my review, I'll continue tomorrow. https://github.com/llvm/llvm-project/pull/106982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -315,6 +315,62 @@ static bool isFunctionMacroExpansion(SourceLocation Loc, return EInfo.isFunctionMacroExpansion(); } +static const LocationContext *getFirstNonCtorCall(const LocationContext *LCtx) { + while (llvm::isa_and_nonnull(LCtx->getDecl())) +LCtx = LCtx->get

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -718,6 +718,91 @@ class NoStateChangeFuncVisitor : public BugReporterVisitor { PathSensitiveBugReport &R) final; }; +/// Put a diagnostic on return statement of all inlined functions +/// for which the region of interest \p RegionOfInter

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -718,6 +718,91 @@ class NoStateChangeFuncVisitor : public BugReporterVisitor { PathSensitiveBugReport &R) final; }; +/// Put a diagnostic on return statement of all inlined functions +/// for which the region of interest \p RegionOfInter

[clang] [analyzer] Implement binary operations on LazyCompoundVals (PR #106982)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -315,6 +315,62 @@ static bool isFunctionMacroExpansion(SourceLocation Loc, return EInfo.isFunctionMacroExpansion(); } +static const LocationContext *getFirstNonCtorCall(const LocationContext *LCtx) { + while (llvm::isa_and_nonnull(LCtx->getDecl())) +LCtx = LCtx->get

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread Gábor Horváth via cfe-commits
@@ -287,3 +287,18 @@ std::span test2() { return abc; // expected-warning {{address of stack memory associated with local variable}} } } // namespace ctor_cases + +namespace GH106372 { +class [[gsl::Owner]] Foo {}; +class [[gsl::Pointer]] FooView {}; + +template +struct Stat

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread Gábor Horváth via cfe-commits
@@ -287,3 +287,18 @@ std::span test2() { return abc; // expected-warning {{address of stack memory associated with local variable}} } } // namespace ctor_cases + +namespace GH106372 { +class [[gsl::Owner]] Foo {}; +class [[gsl::Pointer]] FooView {}; + +template +struct Stat

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-02 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. After a couple more tests LGTM! https://github.com/llvm/llvm-project/pull/106997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-09-02 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/101962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix false positive for stack-addr leak on simple param ptr (PR #107003)

2024-09-02 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/107003 Assigning to a pointer parameter does not leak the stack address because it stays within the function and is not shared with the caller. Previous implementation reported any association of a pointer parameter wit

[clang] [analyzer] Fix false positive for stack-addr leak on simple param ptr (PR #107003)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Arseniy Zaostrovnykh (necto) Changes Assigning to a pointer parameter does not leak the stack address because it stays within the function and is not shared with the caller. Previous implementation reported any associati

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-09-02 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -37,15 +37,20 @@ class SemaARM : public SemaBase { /// flags. Do Sema checks for the runtime mode. }; + bool CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, unsigned ArgIdx, + unsigned EltBitWidth, unsigned VecBi

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -37,15 +37,20 @@ class SemaARM : public SemaBase { /// flags. Do Sema checks for the runtime mode. }; + bool CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, unsigned ArgIdx, + unsigned EltBitWidth, unsigned VecBi

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -403,6 +408,38 @@ class Intrinsic { (Type.isScalar() && Type.isHalf())) UseMacro = true; } + +int ArgIdx, Kind, TypeArgIdx; +std::vector ImmCheckList = R->getValueAsListOfDefs("ImmChecks"); +for (const auto *I : ImmCheckList) { + unsign

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -1210,18 +1196,19 @@ void SVEEmitter::createIntrinsic( // Collate a list of range/option checks for the immediates. SmallVector ImmChecks; for (auto *R : ImmCheckList) { - int64_t Arg = R->getValueAsInt("Arg"); - int64_t EltSizeArg = R->getValueAsInt("E

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -1541,8 +1528,9 @@ void SVEEmitter::createRangeChecks(raw_ostream &OS) { OS << "case SVE::BI__builtin_sve_" << Def->getMangledName() << ":\n"; for (auto &Check : Def->getImmChecks()) - OS << "ImmChecks.push_back(std::make_tuple(" << Check.getArg() << ", " -

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-02 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/106736 >From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Thu, 29 Aug 2024 17:16:37 -0700 Subject: [PATCH 1/6] [clang][rtsan] Add realtime sanitizer to Features.def --- cla

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-02 Thread Chris Apple via cfe-commits
@@ -0,0 +1,117 @@ +//===-- sanitizer/rtsan_interface.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] 26bf0b4 - [clang][Driver] Add a custom error option in multilib.yaml. (#105684)

2024-09-02 Thread via cfe-commits
Author: Simon Tatham Date: 2024-09-02T16:56:03+01:00 New Revision: 26bf0b4ae7df7f5350f71afd40a57cdf8f98c588 URL: https://github.com/llvm/llvm-project/commit/26bf0b4ae7df7f5350f71afd40a57cdf8f98c588 DIFF: https://github.com/llvm/llvm-project/commit/26bf0b4ae7df7f5350f71afd40a57cdf8f98c588.diff

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-09-02 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm closed https://github.com/llvm/llvm-project/pull/105684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-09-02 Thread Simon Tatham via cfe-commits
statham-arm wrote: There are two failed CI checks here, but they both seem to be complaining about a libc++ test called `pstl.merge.pass.cpp`, which is surely completely unrelated to this clang driver change specific to bare-metal multilib setups. https://github.com/llvm/llvm-project/pull/1056

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-02 Thread via cfe-commits
https://github.com/davidtrevelyan edited https://github.com/llvm/llvm-project/pull/106736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-02 Thread via cfe-commits
https://github.com/davidtrevelyan approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/106736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7e8aba2 - [clang][OpenMP] `masked` and `master` are not capturing (#106787)

2024-09-02 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-09-02T16:56:14-05:00 New Revision: 7e8aba2b993014d975cf35f1f9831c951c4ab292 URL: https://github.com/llvm/llvm-project/commit/7e8aba2b993014d975cf35f1f9831c951c4ab292 DIFF: https://github.com/llvm/llvm-project/commit/7e8aba2b993014d975cf35f1f9831c951c4ab292

[clang] [clang][OpenMP] `masked` and `master` are not capturing (PR #106787)

2024-09-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/106787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

<    1   2   3   >