[clang] [llvm] [llvm][vfs] Allow root directory remap. Fix assertion failure. (PR #83766)

2024-03-06 Thread via cfe-commits
https://github.com/yelleyee edited https://github.com/llvm/llvm-project/pull/83766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread via cfe-commits
tomasz-kaminski-sonarsource wrote: While moving the test case to `cxx2b-deducing-this.cpp` it would be also nice to add a `clang_analyzer_dump()` line similar to one already existing in the file, to see if the values of the arguments are mapped correctly. > We need to fix it after? @tomasz-kam

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-03-06 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Well, the test now runs for 4 different platforms and the PR checks are all green, so I guess we can merge. https://github.com/llvm/llvm-project/pull/83281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/84133 This avoids a known libFormat bug where the heuristic can OOM on certain large files (particularly single-header libraries such as miniaudio.h). The OOM will still happen on affected files if you actually

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-06 Thread via cfe-commits
mydeveloperday wrote: Just thinking out loud and maybe not for this patch but for a more general solution, what we seem to never do is collect information about types local to the file as we go; For example what if a first pass identified types from declarations and function argument declarati

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes This avoids a known libFormat bug where the heuristic can OOM on certain large files (particularly single-header libraries such as miniaudio.h). The OOM will still happen on affected files

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-06 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: https://github.com/llvm/llvm-project/pull/84017 changed the test in ways that this isn't needed anymore. https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: For additional context, please refer to the discussion of https://github.com/llvm/llvm-project/pull/78925, which was my first attempt to fix these bugs using a different approach https://github.com/llvm/llvm-project/pull/84133 _

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/84133 >From e6db271ca93d4c1d8a192bd1ac9e3809b4a3a2a9 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:55:10 -0500 Subject: [PATCH] [clangd] Avoid libFormat's objective-c guessing heuristic

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread via cfe-commits
https://github.com/Puellaquae created https://github.com/llvm/llvm-project/pull/84135 Change unstable assertion into compilation error, and add a test for it. >From a2c88b0b615875d625b49e596886a0f5b32cf159 Mon Sep 17 00:00:00 2001 From: Puellaquae Date: Wed, 6 Mar 2024 05:22:08 + Subject:

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

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

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-06 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I've merged #82957. Thanks. I've written the clangd patch and posted it for review at https://github.com/llvm/llvm-project/pull/84133. If that gets approved, I will abandon this PR. https://github.com/llvm/llvm-project/pull/78925 ___

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Puelloc (Puellaquae) Changes Change unstable assertion into compilation error, and add a test for it. --- Full diff: https://github.com/llvm/llvm-project/pull/84135.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGStmt.cpp (+2-1)

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/84136 - [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 - Handle attribute/target >From 2ba698b222fa1dc963d21850d5931562aa65533d Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Tue, 26 Se

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Freddy Ye (FreddyLeaf) Changes - [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 - Handle attribute/target --- Patch is 38.00 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/ll

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-06 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt created https://github.com/llvm/llvm-project/pull/84137 Instead of maintaining per-function-invocation malloc()'ed tables to track which functions each label belongs to, store the equivalent info in jump buffers (jmp_buf) themselves. Also, use a less emscripten-looking

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread via cfe-commits
https://github.com/Puellaquae edited https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: YAMAMOTO Takashi (yamt) Changes Instead of maintaining per-function-invocation malloc()'ed tables to track which functions each label belongs to, store the equivalent info in jump buffers (jmp_buf) themselves. Also, use a less emscripten

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 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 9a894e7d84892489826375f94c08ab16ccacc4bb 54c78b5ad694946186ba115576a6eea9c8992349 --

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
@@ -15,7 +15,7 @@ int baz(__m256i a) { #if NEED_AVX_2 __m128 need_avx(__m128 a, __m128 b) { - return _mm_cmp_ps(a, b, 0); // expected-error {{'__builtin_ia32_cmpps' needs target feature avx}} + return _mm_cmp_ps(a, b, 8); // expected-error {{'__builtin_ia32_cmpps' needs ta

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: The difference with #67410 is here: 54c78b5ad694946186ba115576a6eea9c8992349 https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-06 Thread Iain Sandoe via cfe-commits
iains wrote: I have no further comments so LGTM if there are no objections from the other reviewers this week. https://github.com/llvm/llvm-project/pull/75894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] 7a0accc - [clang] Add some CodeGen tests for CWG 4xx issues (#83715)

2024-03-06 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-03-06T12:21:52+04:00 New Revision: 7a0acccd81df268dc7ad4c0358c42552789f19b4 URL: https://github.com/llvm/llvm-project/commit/7a0acccd81df268dc7ad4c0358c42552789f19b4 DIFF: https://github.com/llvm/llvm-project/commit/7a0acccd81df268dc7ad4c0358c42552789f19b4.

[clang] [clang] Add some CodeGen tests for CWG 4xx issues (PR #83715)

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

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-06 Thread Ryosuke Niwa via cfe-commits
@@ -189,18 +202,16 @@ class UncountedLocalVarsChecker dyn_cast_or_null(Ref->getFoundDecl())) { const auto *MaybeGuardianArgType = MaybeGuardian->getType().getTypePtr(); - if (!MaybeGuardianArgType) -return; -

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-06 Thread Ryosuke Niwa via cfe-commits
@@ -189,18 +202,16 @@ class UncountedLocalVarsChecker dyn_cast_or_null(Ref->getFoundDecl())) { const auto *MaybeGuardianArgType = MaybeGuardian->getType().getTypePtr(); - if (!MaybeGuardianArgType) -return; -

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-06 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/84138 `llvm::MaybeAlign` does this, for example. It's not an option to simply ignore these derived classes because they get cast back to the optional classes (for example, simply when calling the optional member f

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes `llvm::MaybeAlign` does this, for example. It's not an option to simply ignore these derived classes because they get cast back to the optional classes (for example, simply when calling the optional member funct

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread via cfe-commits
tomasz-kaminski-sonarsource wrote: Looking at the examples for the static operator at ([live example](https://godbolt.org/z/GhhT5ohh7)): ```c++ struct S { int pad; static void operator()(int x, int y) { // clang_analyzer_dump(x); // clang_analyzer_dump(y); } }; void calls() {

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread via cfe-commits
@@ -13649,10 +13649,29 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // use evaluation contexts to distinguish the function parameter case. CXXRecordDecl::LambdaDependencyKind DependencyKind = CXXRecordDecl::LDK_Unknown; + DeclContext *DC = getSema().CurCon

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread via cfe-commits
@@ -13649,10 +13649,29 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // use evaluation contexts to distinguish the function parameter case. CXXRecordDecl::LambdaDependencyKind DependencyKind = CXXRecordDecl::LDK_Unknown; + DeclContext *DC = getSema().CurCon

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread via cfe-commits
@@ -13649,10 +13649,29 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // use evaluation contexts to distinguish the function parameter case. CXXRecordDecl::LambdaDependencyKind DependencyKind = CXXRecordDecl::LDK_Unknown; + DeclContext *DC = getSema().CurCon

[clang] aced81c - [C23] Implement N3018: The constexpr specifier for object definitions (#73099)

2024-03-06 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-03-06T09:46:35+01:00 New Revision: aced81c0a5bf30dda99fde2e28364426de4c18d3 URL: https://github.com/llvm/llvm-project/commit/aced81c0a5bf30dda99fde2e28364426de4c18d3 DIFF: https://github.com/llvm/llvm-project/commit/aced81c0a5bf30dda99fde2e28364426de4c18

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

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

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2258,6 +2258,94 @@ class ExtractTypeForDeductionGuide } }; +// Build a deduction guide with the specified parameter types. +FunctionTemplateDecl * +buildDeductionGuide(Sema &SemaRef, TemplateDecl *OriginalTemplate, +TemplateParameterList *TemplatePara

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
hokein wrote: > > @cor3ntin, @erichkeane, thanks for all review comments. I'm not sure you > > have reviewed the whole patch. My feeling is that the core part > > (`DeclareImplicitDeductionGuidesForTypeAlias`) may not have received > > sufficient reviews. It would be great if you can take a cl

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-06 Thread Matt Arsenault via cfe-commits
@@ -6826,6 +6826,10 @@ def warn_floatingpoint_eq : Warning< "comparing floating point with == or != is unsafe">, InGroup>, DefaultIgnore; +def warn_fenv_access : Warning< + "floating point environment access without #pragma STDC FENV_ACCESS set ON">, + InGroup>;

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -10598,10 +10598,38 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -1446,6 +1447,59 @@ namespace { return inherited::TransformFunctionProtoType(TLB, TL); } +QualType TransformInjectedClassNameType(TypeLocBuilder &TLB, +InjectedClassNameTypeLoc TL) { + auto Type = inherited::Tra

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -10598,10 +10598,34 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -6286,8 +6284,18 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, QualType T = CheckTemplateIdType(TemplateName(TD), Loc, Args); if (T.isNull()) return nullptr; - auto *SubstRecord = T->getAsCXXRecordDecl();

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. --

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. + (`#5405

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

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

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: thanks, this looks good in general, just some nits. https://github.com/llvm/llvm-project/pull/84133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -18515,20 +18515,20 @@ X86TargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { return LowerGlobalOrExternal(Op, DAG, /*ForCall=*/false); } -static SDValue -GetTLSADDR(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA, - SDValue *InG

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-06 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: > > > By the way, is there any plan to support `CFLUSH.I.L1` in the future? > > > > > > Flushing the instruction cache doesn't make sense given it can never be > > dirty. Invalidating/discarding does, but that's just what fence.i is doing? > > A cflush.i.l1 did appear in some

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-06 Thread via cfe-commits
cor3ntin wrote: Can we add a release note and documentation for this? Thanks! https://github.com/llvm/llvm-project/pull/75894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-03-06 Thread via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/84146 This is re-working of #74460, which adds a soft-float ABI for AArch64. That was reverted because it causes errors when building the linux and fuchsia kernels. The problem is that GCC's implementation of the AB

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang-codegen Author: None (ostannard) Changes This is re-working of #74460, which adds a soft-float ABI for AArch64. That was reverted because it causes errors when building the linux and fuchsia kernels. The problem

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -813,3 +813,57 @@ __m128 test_mm_xor_ps(__m128 A, __m128 B) { // CHECK: xor <4 x i32> return _mm_xor_ps(A, B); } + +__m128 test_mm_cmp_ps_eq_oq(__m128 a, __m128 b) { RKSimon wrote: Move these up (they should be approximately alpha sorted) https://githu

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -2613,6 +2614,24 @@ void CGBuilderInserter::InsertHelper( // called function. void CodeGenFunction::checkTargetFeatures(const CallExpr *E, const FunctionDecl *TargetDecl) { + // SemaCheking cannot handle below x86 builtins because t

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Should we update the existing SSE/SSE2 cmpeq/cmplt intinsics to use __builtin_ia32_cmp* instead of __builtin_ia32_cmpeq??/__builtin_ia32_cmplt?? etc? https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commit

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -462,12 +462,12 @@ TARGET_BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufpd256, "V4dV4dV4dIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufps256, "V8fV8fV8fIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -1719,3 +1719,57 @@ __m128i test_mm_xor_si128(__m128i A, __m128i B) { // CHECK: xor <2 x i64> %{{.*}}, %{{.*}} return _mm_xor_si128(A, B); } + +__m128d test_mm_cmp_pd_eq_oq(__m128d a, __m128d b) { RKSimon wrote: Sorting https://github.com/llvm/llvm-pro

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-03-06 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 d70254a623d7c23c493cc793756a5a9d758b0a14 5535c5daa0a09e4e62d3fba61f56be8c7bad8c89 --

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-03-06 Thread via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/84146 >From 96416238cb4d5c197aab4fed96af5161ebff7198 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Fri, 1 Dec 2023 10:06:57 + Subject: [PATCH 1/7] [AArch64] Split feature tests for FP and SIMD AArch64Targ

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/11] Bugfix for choosing the more specialized overload Th

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -10598,10 +10598,34 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. --

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. + (`#5405

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -10598,10 +10598,38 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -1446,6 +1447,59 @@ namespace { return inherited::TransformFunctionProtoType(TLB, TL); } +QualType TransformInjectedClassNameType(TypeLocBuilder &TLB, +InjectedClassNameTypeLoc TL) { + auto Type = inherited::Tra

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/12] Bugfix for choosing the more specialized overload Th

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Can we add a release note and documentation for this? Thanks! The current patch is transparent to users and it is only part of the series patches. I'd like to document that after I made the series of patches. https://github.com/llvm/llvm-project/pull/75894 _

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/83136 >From cdc9ee6c322af0ceed162f3f714bcd0a22e020c3 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 27 Feb 2024 22:16:38 +0800 Subject: [PATCH 1/5] [X86] Add Support for X86 TLSDESC Relocations --- clang/li

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. + (`#5405

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

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

[clang] 92529eb - [FMV] Allow target version definitions in any order. (#83887)

2024-03-06 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-03-06T10:42:39Z New Revision: 92529eb4aeb2dbb706aedebc1ed9fc4f8045231a URL: https://github.com/llvm/llvm-project/commit/92529eb4aeb2dbb706aedebc1ed9fc4f8045231a DIFF: https://github.com/llvm/llvm-project/commit/92529eb4aeb2dbb706aedebc1ed9fc4f8045231a.di

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

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

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/83136 >From cdc9ee6c322af0ceed162f3f714bcd0a22e020c3 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 27 Feb 2024 22:16:38 +0800 Subject: [PATCH 1/6] [X86] Add Support for X86 TLSDESC Relocations --- clang/li

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/83997 >From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 5 Mar 2024 19:56:59 +0800 Subject: [PATCH 1/3] gh56556 --- clang/lib/Sema/TreeTransform.h | 6 -- 1 file

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-06 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/81545 >From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001 From: William Huang Date: Mon, 12 Feb 2024 02:27:13 -0500 Subject: [PATCH 1/2] Add option to generate additional info for expression contai

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread Younan Zhang via cfe-commits
@@ -13649,10 +13649,29 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // use evaluation contexts to distinguish the function parameter case. CXXRecordDecl::LambdaDependencyKind DependencyKind = CXXRecordDecl::LDK_Unknown; + DeclContext *DC = getSema().CurCon

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/84150 A `TopLevelStmtDecl` must be a `DeclContext` itself to avoid variable definitions to be added to the outer `TranslationUnitDecl` context. Additionally, `ActOnForStmt()` requires a `CompoundScope` when pro

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin Thanks! I have updated the test to reflect the nested `requires` cases. PTAL? https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-06 Thread Haojian Wu via cfe-commits
@@ -96,6 +96,10 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Initial support for class template argument deduciton (CTAD) for type alias + templates. + (`#5405

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes A `TopLevelStmtDecl` must be

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

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

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: This fixes https://github.com/llvm/llvm-project/issues/83028 which provides context on investigation. https://github.com/llvm/llvm-project/pull/84150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-03-06 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/83281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-03-06 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/83281 >From a9419bc3ffa3d383a9373f0a116795162632dd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 28 Feb 2

[clang] 239312e - Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf" (#83281)

2024-03-06 Thread via cfe-commits
Author: Alejandro Álvarez Ayllón Date: 2024-03-06T12:10:07+01:00 New Revision: 239312e49b2fdf35e23d75197a621ee6087743ee URL: https://github.com/llvm/llvm-project/commit/239312e49b2fdf35e23d75197a621ee6087743ee DIFF: https://github.com/llvm/llvm-project/commit/239312e49b2fdf35e23d75197a621ee6087

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-03-06 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/83281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-03-06 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Reported 2 bugs for MSVC. (The first also affects standard cv-qualifiers.) - https://developercommunity.visualstudio.com/t/cv-qualifiers-and-__restrict-in-the-temp/10609457 - https://developercommunity.visualstudio.com/t/__restrict-on-non-static-member-function/10609449

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-06 Thread Pavel Iliin via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-06 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv updated https://github.com/llvm/llvm-project/pull/84098 >From 528af71d043d306a4aeb5c448a0780fa42644c15 Mon Sep 17 00:00:00 2001 From: Pavel Iliin Date: Wed, 6 Mar 2024 00:23:36 + Subject: [PATCH 1/2] [NFC][Docs] Documenting __builtin_cpu_supports. --- clang/docs/

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Shengchen Kan via cfe-commits
@@ -462,12 +462,12 @@ TARGET_BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufpd256, "V4dV4dV4dIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufps256, "V8fV8fV8fIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia

  1   2   3   4   5   6   >