[clang] [clang] Install scan-build-py into plain "lib" directory (#106608) (PR #106612)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michał Górny (mgorny) Changes Install scan-build-py modules into the plain `lib` directory, without LLVM_LIBDIR_SUFFIX appended, to match the path expected by `intercept-build` executable. This fixes the program being unable to find its

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

2024-08-29 Thread Björn Pettersson via cfe-commits
@@ -103,6 +103,13 @@ class TypeDescriptor { /// representation is that of bitcasting the floating-point value to an /// integer type. TK_Float = 0x0001, +/// An _BitInt(N) type. Lowest bit is 1 for a signed value, 0 for an +/// unsigned value. Remaining bits

[clang] [flang] [flang][Driver] Add support for -mllvm -print-pipeline-passes (PR #106141)

2024-08-29 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. Approving with the caveat that we should avoid leveraging LLVM options like this and that long-term this should be refactored as a dedicated, first-class driver option. This can be implemented in a seperate PR. Thank you for the discu

[clang] [flang] [flang][Driver] Add support for -mllvm -print-pipeline-passes (PR #106141)

2024-08-29 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/106141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/106568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0141a3c - [analyzer] Fix nullptr dereference for symbols from pointer invalidation (#106568)

2024-08-29 Thread via cfe-commits
Author: Arseniy Zaostrovnykh Date: 2024-08-29T21:59:03+02:00 New Revision: 0141a3cde4d8f2c8ff9e957f981f37e65a69a325 URL: https://github.com/llvm/llvm-project/commit/0141a3cde4d8f2c8ff9e957f981f37e65a69a325 DIFF: https://github.com/llvm/llvm-project/commit/0141a3cde4d8f2c8ff9e957f981f37e65a69a32

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

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

[clang] [clang-tools-extra] Add function check for windows platform (PR #106581)

2024-08-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Looks good overall. I have mixed feelings about combining semantic changes across semi-subprojects like builtins, clang-tidy and the clang static analyzer. Could you please demonstrate the improvements on tests? https://github.

[clang] [clang-tools-extra] Add function check for windows platform (PR #106581)

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

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-29 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. I think this is good to go, LGTM!! https://github.com/llvm/llvm-project/pull/101583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-29 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/101583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-29 Thread Artem Dergachev via cfe-commits
@@ -443,6 +443,426 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +AST_MATCHER_P(CallExpr, hasNumArgs, unsigned, Num) { + return Node.getNumArgs() == Num; +} + +namespace libc_func_matchers { +// Under `libc_func_matchers`, define a set of matche

[clang] [analyzer] Fix nullptr dereference for symbols from pointer invalidation (PR #106568)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/5072 Here is the relevan

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-29 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/101989 >From 4516f38d4cba70f2368dc68c72e0024f3f3e0732 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 2 Aug 2024 21:40:24 +0200 Subject: [PATCH 1/6] [clang][HLSL] Add sign intrinsic part 3 --- clang/include/cl

[clang] [clang-format] Fix clang-format-buffer--buffer-encoding test (PR #106305)

2024-08-29 Thread via cfe-commits
https://github.com/darkfeline closed https://github.com/llvm/llvm-project/pull/106305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread Alex MacLean via cfe-commits
@@ -5921,6 +5921,61 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts, break; } + case Instruction::BitCast: { +const Value *Src; +if (!match(Op, m_ElementWiseBitCast(m_Value(Src))) || +!Src->getType()->isIntOrIntVectorTy()) + b

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-29 Thread Chris B via cfe-commits
@@ -64,6 +64,10 @@ class SemaHLSL : public SemaBase { // HLSL Type trait implementations bool IsScalarizedLayoutCompatible(QualType T1, QualType T2) const; + bool IsIntangibleType(const QualType T1); + +private: + llvm::DenseMap IsIntangibleTypeCache; ll

[clang] [lld] [llvm] Thin2 (PR #106602)

2024-08-29 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/106602 >From 561eb1810f04f373410ba2f37f846eafe46515dc Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Wed, 24 Apr 2024 11:26:23 -0700 Subject: [PATCH 1/6] [CGData][MachineOutliner] Global Outlining2 This commit i

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-29 Thread via cfe-commits
nfrmtk wrote: ping @cor3ntin https://github.com/llvm/llvm-project/pull/105647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N */ sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-29 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. Looks good to me 👍 https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-29 Thread Tim Gymnich via cfe-commits
@@ -916,7 +916,7 @@ float4 lerp(float4, float4, float4); /// \brief Returns the length of the specified floating-point vector. /// \param x [in] The vector of floats, or a scalar float. /// -/// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + �). +/// Length is

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-compiler-rt-sanitizer Author: Florian Mayer (fmayer) Changes This reverts commit 66927fb95abef9327b453d7213c5df7d641269be. Fixed clang tests --- Patch is 183.04 KiB, truncated to 20.00 KiB below, full version: ht

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-29 Thread Alexandros Lamprineas via cfe-commits
@@ -3682,6 +3682,8 @@ static const struct Extension { {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}}, {"sve2p1", {AArch64::FeatureSVE2p1}}, {"ls64", {AArch64::FeatureLS64}}, +{"ls64_v", {AArch64::FeatureLS64_V}}, +{"ls64_accdata", {AArch64::FeatureLS64_ACCD

[clang] 049b60c - [NFC][Clang] Avoid potential null pointer dereferences in Sema::AddInitializerToDecl(). (#106235)

2024-08-29 Thread via cfe-commits
Author: Tom Honermann Date: 2024-08-29T17:00:19-04:00 New Revision: 049b60c5bb7e774b74772c6b89c72593f73a89b0 URL: https://github.com/llvm/llvm-project/commit/049b60c5bb7e774b74772c6b89c72593f73a89b0 DIFF: https://github.com/llvm/llvm-project/commit/049b60c5bb7e774b74772c6b89c72593f73a89b0.diff

[clang] [NFC][Clang] Avoid potential null pointer dereferences in Sema::AddInitializerToDecl(). (PR #106235)

2024-08-29 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann closed https://github.com/llvm/llvm-project/pull/106235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [NFC] Prefer subprocess.DEVNULL over os.devnull (PR #106500)

2024-08-29 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Thanks! I have no commit access, please click the merge button :) https://github.com/llvm/llvm-project/pull/106500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106335 >From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 28 Aug 2024 00:34:12 -0300 Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a templat

[clang] Add wasm-opt warning (PR #100321)

2024-08-29 Thread Alex Crichton via cfe-commits
alexcrichton wrote: I can see how the current state of the world is resulting in this PR, but at least personally I continue to feel that a warning should not be emitted if no flags are passed and `wasm-opt` is not found. Part of it I've [mentioned above](https://github.com/llvm/llvm-project/p

[clang] [clang][test] Rewrote test using command substitution to work with lit internal shell syntax (PR #105902)

2024-08-29 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu edited https://github.com/llvm/llvm-project/pull/105902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Rewrote test using command substitution to work with lit internal shell syntax (PR #105902)

2024-08-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/105902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-29 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From d7e0361ed91032154aafee3cf2f9a7cdc233a395 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 27 Jun 2024 17:11:52 -0700 Subject: [PATCH 1/2] [clang][CodeGen] Zero init unspecified fields in initializers in

[clang] Fix #104794: Fixed sret bugs with `clang::musttail` on 32 bit targets (PR #104795)

2024-08-29 Thread Eli Friedman via cfe-commits
@@ -5085,7 +5085,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, RawAddress SRetAlloca = RawAddress::invalid(); llvm::Value *UnusedReturnSizePtr = nullptr; if (RetAI.isIndirect() || RetAI.isInAlloca() || RetAI.isCoerceAndExpand()) { -if (IsVirtu

[clang] 7284e0f - [clang] mangle placeholder for deduced type as a template-prefix (#106335)

2024-08-29 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-08-29T18:53:03-03:00 New Revision: 7284e0f3a4f8924a0f69f654db8c4b4d00d232cb URL: https://github.com/llvm/llvm-project/commit/7284e0f3a4f8924a0f69f654db8c4b4d00d232cb DIFF: https://github.com/llvm/llvm-project/commit/7284e0f3a4f8924a0f69f654db8c4b4d00d232cb.dif

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/106335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks. I'll be happy to continue on post-commit if @zygoloid or @rjmccall have any concerns. https://github.com/llvm/llvm-project/pull/106335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] 4caf019 - [clang][test] Rewrote test using command substitution to work with lit internal shell syntax (#105902)

2024-08-29 Thread via cfe-commits
Author: Connie Zhu Date: 2024-08-29T14:54:40-07:00 New Revision: 4caf0196c042601b1c442a5726a157fead00ecc7 URL: https://github.com/llvm/llvm-project/commit/4caf0196c042601b1c442a5726a157fead00ecc7 DIFF: https://github.com/llvm/llvm-project/commit/4caf0196c042601b1c442a5726a157fead00ecc7.diff LO

[clang] [clang][test] Rewrote test using command substitution to work with lit internal shell syntax (PR #105902)

2024-08-29 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu closed https://github.com/llvm/llvm-project/pull/105902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-08-29 Thread Craig Topper via cfe-commits
@@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << Tune << ParsedAttrs.Tune << Target; - if (Context.getTargetInfo().getTriple().isRI

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread via cfe-commits
@@ -5921,6 +5921,61 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts, break; } + case Instruction::BitCast: { +const Value *Src; +if (!match(Op, m_ElementWiseBitCast(m_Value(Src))) || +!Src->getType()->isIntOrIntVectorTy()) + b

[clang] [llvm] [WebAssembly] Add intrinsics to wasm_simd128.h for all FP16 instructions (PR #106465)

2024-08-29 Thread Heejin Ahn via cfe-commits
aheejin wrote: Looks good to me, but I'm not an expert here.. Maybe @tlively can take a look? https://github.com/llvm/llvm-project/pull/106465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread via cfe-commits
@@ -5921,6 +5921,61 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts, break; } + case Instruction::BitCast: { +const Value *Src; +if (!match(Op, m_ElementWiseBitCast(m_Value(Src))) || +!Src->getType()->isIntOrIntVectorTy()) + b

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread via cfe-commits
https://github.com/goldsteinn approved this pull request. LGTM (but needs a rebase) https://github.com/llvm/llvm-project/pull/97762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)

2024-08-29 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 approved this pull request. LGTM now. Thanks very much for the fix. https://github.com/llvm/llvm-project/pull/106012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] [WebAssembly] Add intrinsics to wasm_simd128.h for all FP16 instructions (PR #106465)

2024-08-29 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. Looks great! Glad you found the cross-project-tests. https://github.com/llvm/llvm-project/pull/106465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz requested changes to this pull request. I left an inline comment about this, but rather than keeping a side map in the SemaHLSL object we should take a bit in the RecordDecl bitfield to signify if the type is intangible. https://github.com/llvm/llvm-project/pull/1

[clang] [HLSL] Add StructuredBuffer to external sema source (PR #106316)

2024-08-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/106316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-08-29 Thread Chris B via cfe-commits
@@ -414,9 +414,20 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD, void CGHLSLRuntime::setHLSLFunctionAttributes(const FunctionDecl *FD, llvm::Function *Fn) { - if (FD->isInExportDeclContext()) { -const String

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-08-29 Thread Chris B via cfe-commits
@@ -290,8 +290,6 @@ struct BuiltinTypeDeclBuilder { SourceLocation())); MethodDecl->setLexicalDeclContext(Record); MethodDecl->setAccess(AccessSpecifier::AS_public); -MethodDecl->addAttr(AlwaysInlineAttr::CreateImplicit(

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-29 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: It probably makes sense to add a helper like the following to CodeGenModule or something like that: ``` bool shouldZeroInitPadding() { // Comment explaining reasoning for this rule return !CGM.getLangOpts().CPlusPlus; } ``` So we don't have `//

[clang] Update Catch missing format attributes (PR #106649)

2024-08-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/106649 None >From 46f3fb6634138f2d9ce8f301b05d09d16da9f3ea Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 29 Aug 2024 17:43:18 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

[clang] Update Catch missing format attributes (PR #106649)

2024-08-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/106649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update Catch missing format attributes (PR #106649)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/106649.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaDeclAttr.cpp (+14-14) - (modified) clang/test/Sema/attr-format-missing.c (+27-37)

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

2024-08-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Can you explain what changes were made to address the various issues which > caused the earlier revert? I've tried diffing the PRs to see what the changes > are, but my git-fu is insufficient to the task. :-D Just for convenience I extracted update diff into https://github

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-08-29 Thread Chris Apple via cfe-commits
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/106650 None >From 4af0857bd8f2cb332a1ee7b359002ed6522d1aa8 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Thu, 29 Aug 2024 17:16:37 -0700 Subject: [PATCH] [clang][rtsan] Add realtime sanitizer to Features.def --- c

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/106650.diff 2 Files Affected: - (modified) clang/include/clang/Basic/Features.def (+2) - (added) clang/test/Lexer/has_feature_realtime_sanitizer.cpp

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks for working on the refactor! I did a cursory review, mostly on the `getTemplateInstantiationArgs()` part, and the general approach looks plausible. Re @mizvekov : this patch could supersede my refactoring work not only because of the reuse of the lo

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -1056,16 +1052,20 @@ bool Sema::AreConstraintExpressionsEqual(const NamedDecl *Old, bool Sema::FriendConstraintsDependOnEnclosingTemplate(const FunctionDecl *FD) { assert(FD->getFriendObjectKind() && "Must be a friend!"); + FunctionTemplateDecl *FTD = FD->getDescribedFu

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -4682,6 +4683,17 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param) { assert(Param->hasUninstantiatedDefaultArg()); + NamedDecl *Pattern = FD; + std::optional> Innermost; + + if

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -171,374 +139,379 @@ bool isLambdaEnclosedByTypeAliasDecl( .TraverseType(Underlying); } -// Add template arguments from a variable template instantiation. -Response -HandleVarTemplateSpec(const VarTemplateSpecializationDecl *VarTemplSpec, -

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -317,7 +317,8 @@ struct ConvertConstructorToDeductionGuideTransform { } if (NestedPattern) - OuterInstantiationArgs = SemaRef.getTemplateInstantiationArgs(Template); + OuterInstantiationArgs = SemaRef.getTemplateInstantiationArgs( + /*D=*/nullptr,

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -1669,25 +1640,43 @@ namespace { ExprResult RebuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, LambdaScopeInfo *LSI) { +#if 1 CXXMethodDecl *MD = LSI->CallOperator; - for (ParmVarDecl *PVD : MD->parameters())

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -827,25 +825,16 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F, // - The occurrence of U in the function parameter is [depth:0, index:0] // - The template parameter of U is [depth:0, index:0] // - // We add the outer template arguments which

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -171,374 +139,379 @@ bool isLambdaEnclosedByTypeAliasDecl( .TraverseType(Underlying); } -// Add template arguments from a variable template instantiation. -Response -HandleVarTemplateSpec(const VarTemplateSpecializationDecl *VarTemplSpec, -

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

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

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -171,374 +139,379 @@ bool isLambdaEnclosedByTypeAliasDecl( .TraverseType(Underlying); } -// Add template arguments from a variable template instantiation. -Response -HandleVarTemplateSpec(const VarTemplateSpecializationDecl *VarTemplSpec, -

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -2112,6 +2078,33 @@ DeclResult Sema::CheckClassTemplate( NewClass->setLexicalDeclContext(CurContext); NewTemplate->setLexicalDeclContext(CurContext); + // Ensure that the template parameter lists are compatible. Skip this check + // for a friend in a dependent context

[clang] [Clang][Parser] Fix name lookup of template parameters for out-of-line specializations (PR #101020)

2024-08-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/101020 >From 420705203a72c82446bd491b5766dde5fef116ff Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 29 Jul 2024 22:10:19 +0800 Subject: [PATCH] [Clang][Parser] Fix name lookup of template parameters for out-o

[clang] 7579787 - [clang-format] Correctly identify token-pasted record names (#106484)

2024-08-29 Thread via cfe-commits
Author: Owen Pan Date: 2024-08-29T19:14:19-07:00 New Revision: 7579787e05966f21684dd4b4a15b9deac13d09e1 URL: https://github.com/llvm/llvm-project/commit/7579787e05966f21684dd4b4a15b9deac13d09e1 DIFF: https://github.com/llvm/llvm-project/commit/7579787e05966f21684dd4b4a15b9deac13d09e1.diff LOG:

[clang] [clang-format] Correctly identify token-pasted record names (PR #106484)

2024-08-29 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/106484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly identify token-pasted record names (PR #106484)

2024-08-29 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 7579787e05966f21684dd4b4a15b9deac13d09e1 https://github.com/llvm/llvm-project/pull/106484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > Was this discussed/reviewed/motivated? There are drawbacks to this > > > approach outlined in #72383 > > > @iains @jyknight @AaronBallman @Bigcheese > > > > > > The motivation is in #72383 and I comment in [#72383 > > (comment)](https://github.com/llvm/llvm-project/iss

[clang] [clang-format] Correctly identify token-pasted record names (PR #106484)

2024-08-29 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 7579787e05966f21684dd4b4a15b9deac13d09e1 https://github.com/llvm/llvm-project/actions/runs/10625680174 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Also, do you plan to fix https://github.com/llvm/llvm-project/issues/102320 in this or the follow-up patches? https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-29 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/106654 See https://github.com/llvm/llvm-project/pull/88238#issuecomment-2316954781. >From b71f4cf3ae2844583171cd0cc75826b8911a7b2b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 29 Aug 2024 19:27:32 -0700 Subject:

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes See https://github.com/llvm/llvm-project/pull/88238#issuecomment-2316954781. --- Full diff: https://github.com/llvm/llvm-project/pull/106654.diff 2 Files Affected: - (modified) clang/lib/Format/Unwrapped

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-29 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/106654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-08-29 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai edited https://github.com/llvm/llvm-project/pull/105541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Younan Zhang via cfe-commits
@@ -809,8 +809,9 @@ class RedeclarableTemplateDecl : public TemplateDecl, }; /// Pointer to the common data shared by all declarations of this - /// template. - mutable CommonBase *Common = nullptr; + /// template, and a flag indicating if the template is a member + //

[clang] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `clang,llvm,mlir` at step 7 "test-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/667 Here is the rel

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/106624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/100684 >From d2169cacc2851db4d57865e26781b93d814ebe80 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Fri, 26 Jul 2024 12:26:16 +1000 Subject: [PATCH 1/4] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E4

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread via cfe-commits
@@ -152,12 +152,22 @@ namespace clang { }; } + namespace RISCVXCV { + enum { +LastRVVBuiltin = RISCVVector::FirstTSBuiltin - 1, +#define BUILTIN(ID, TYPE, ATTRS) BI__builtin_riscv_cv_##ID, +#include "clang/Basic/BuiltinsRISCVXCV.def" realqhc wrote:

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread Craig Topper via cfe-commits
@@ -152,12 +152,22 @@ namespace clang { }; } + namespace RISCVXCV { + enum { +LastRVVBuiltin = RISCVVector::FirstTSBuiltin - 1, +#define BUILTIN(ID, TYPE, ATTRS) BI__builtin_riscv_cv_##ID, +#include "clang/Basic/BuiltinsRISCVXCV.def" topperc wrote:

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread Craig Topper via cfe-commits
@@ -0,0 +1,128 @@ +/*=== riscv_corev_alu.h - CORE-V ALU intrinsics === + * + * 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: Apac

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread Craig Topper via cfe-commits
@@ -0,0 +1,126 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py topperc wrote: Was this really generated by the script? https://github.com/llvm/llvm-project/pull/100684 ___ cfe-commits

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-29 Thread Craig Topper via cfe-commits
@@ -0,0 +1,126 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv32 -target-feature +xcvalu -emit-llvm %s -o - \ +// RUN: | FileCheck %s + +#include +#include + +// CHECK-LABEL: @test_alu_slet +// CHECK: @llvm.

[clang] ca2351d - [C++20] [Modules] Skip checking ODR for merged context in GMF

2024-08-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-30T11:45:01+08:00 New Revision: ca2351dd142bac574021f48f135a9f9383c41128 URL: https://github.com/llvm/llvm-project/commit/ca2351dd142bac574021f48f135a9f9383c41128 DIFF: https://github.com/llvm/llvm-project/commit/ca2351dd142bac574021f48f135a9f9383c41128.diff LO

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/106657 Adjust register binding diagnostic flags code in a couple of ways: - Store the resource class in the Flags struct to avoid duplicated scanning for HLSLResourceClassAttribute - Avoid unnecessary indirection when c

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Adjust register binding diagnostic flags code in a couple of ways: - Store the resource class in the Flags struct to avoid duplicated scanning for HLSLResourceClassAttribute - Avoid unnecessary indirection whe

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla` running on `linaro-g3-02` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/2314 Here is the relevant piece of the

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

2024-08-29 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/106658 Split RecordKeeper `getAllDerivedDefinitions` family of functions into two variants: (a) non-const ones that return vectors of `Record *` and (b) const ones, that return vectors of `const Record *`. This will

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/1787 Here is the relevant piece of th

[clang] [clang][bytecode] Add InitLinkScope for temporary variables (PR #106552)

2024-08-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Can you add more details to the summary explaining why the fix is necessary. https://github.com/llvm/llvm-project/pull/106552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot8` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/3131 Here is the relevant piece o

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/97762 >From 0477447f29b2889f92abf44cacd5e0f2c4e7f387 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 1 Jul 2024 17:06:56 + Subject: [PATCH 1/6] [ValueTracking] use KnownBits to compute fpclass from bitc

[clang] e00e9a3 - [HLSL] Add HLSLAttributedResourceType (#106181)

2024-08-29 Thread via cfe-commits
Author: Helena Kotas Date: 2024-08-29T21:42:20-07:00 New Revision: e00e9a3f8294c9b96cb0328bf136fab72aeec749 URL: https://github.com/llvm/llvm-project/commit/e00e9a3f8294c9b96cb0328bf136fab72aeec749 DIFF: https://github.com/llvm/llvm-project/commit/e00e9a3f8294c9b96cb0328bf136fab72aeec749.diff

[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

2024-08-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/106181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/106654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-08-29 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/106662 Fixes #106418. >From fbefbaae69e7238cf0fd52afe5ccc6b871e81b84 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 29 Aug 2024 22:14:46 -0700 Subject: [PATCH] [clang-format] Correctly annotate braces in macro defi

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #106418. --- Full diff: https://github.com/llvm/llvm-project/pull/106662.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+1-2) - (modified) clang/unittests/Format/Tok

<    1   2   3   4   5   >