[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-31 Thread Chris B via cfe-commits
@@ -4613,14 +4613,13 @@ def HLSLGroupSharedAddressSpace : TypeAttr { let Documentation = [HLSLGroupSharedAddressSpaceDocs]; } -def HLSLParamModifier : TypeAttr { +def HLSLParamModifier : ParameterABIAttr { llvm-beanz wrote: DXC currently parses but ignores

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -59,32 +59,63 @@ // HTML-SHAPE: class Shape // HTML-SHAPE: Defined at line 8 of file {{.*}}Shape.h +// HTML-SHAPE: brief +// HTML-SHAPE: Abstract base class for shapes. // HTML-SHAPE: Provides a common interface for different types of shapes. // HTML-SHAPE: Functions

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-31 Thread Chris B via cfe-commits
@@ -5318,3 +5319,13 @@ OMPIteratorExpr *OMPIteratorExpr::CreateEmpty(const ASTContext &Context, alignof(OMPIteratorExpr)); return new (Mem) OMPIteratorExpr(EmptyShell(), NumIterators); } + +HLSLOutArgExpr *HLSLOutArgExpr::Create(const ASTContext &C, QualType Ty, +

[clang] [clang][ASTImporter] Remove trailing return testing on lambda proto (PR #101031)

2024-07-31 Thread Ding Fei via cfe-commits
danix800 wrote: > > Here can `ToProcess.append(CurrentS->child_begin(), > > CurrentS->child_end());` add any nullptr into `ToProcess` in this testing > > context? > > I think it is possible, but I could not reproduce this case with the shown > code. We have over 30 C++ open-source projects (

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-31 Thread Chris B via cfe-commits
@@ -4689,6 +4719,32 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E, assert(type->isReferenceType() == E->isGLValue() && "reference binding to unmaterialized r-value!"); + // Add writeback for HLSLOutParamExpr. + if (const HLSLOutArgExpr *OE

[clang] [Clang][OpenMP] fix issue: Implicit conversion with `pragma omp taskloop` #100536 (PR #101307)

2024-07-31 Thread via cfe-commits
https://github.com/HenryZ16 updated https://github.com/llvm/llvm-project/pull/101307 >From 75879fa7a7e163ea350c11f37b24c0b2f5231c35 Mon Sep 17 00:00:00 2001 From: HenryZ16 <1546169...@qq.com> Date: Wed, 31 Jul 2024 02:34:04 -0600 Subject: [PATCH] fix issue #100536: Implicit conversion with `prag

[clang] Revert "[CMake][Fuchsia] Include libunwind and libc++abi in baremetal build" (PR #101340)

2024-07-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/101340 Reverts llvm/llvm-project#100908 >From 33647147cc824557560cbb31e2e09cc99ea6e940 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 31 Jul 2024 07:26:19 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"[CMake][Fuc

[clang] 9b017db - Revert "[CMake][Fuchsia] Include libunwind and libc++abi in baremetal build" (#101340)

2024-07-31 Thread via cfe-commits
Author: Petr Hosek Date: 2024-07-31T07:26:45-07:00 New Revision: 9b017db6be8213a989517b494b56fc711af8bf8c URL: https://github.com/llvm/llvm-project/commit/9b017db6be8213a989517b494b56fc711af8bf8c DIFF: https://github.com/llvm/llvm-project/commit/9b017db6be8213a989517b494b56fc711af8bf8c.diff LO

[clang] Revert "[CMake][Fuchsia] Include libunwind and libc++abi in baremetal build" (PR #101340)

2024-07-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/101340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[CMake][Fuchsia] Include libunwind and libc++abi in baremetal build" (PR #101340)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes Reverts llvm/llvm-project#100908 --- Full diff: https://github.com/llvm/llvm-project/pull/101340.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+8-34) ``diff diff -

[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-31 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/96171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Fix __clang_hip_cmath.hip for ambiguity (PR #101341)

2024-07-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/101341 If there is a type T which can be converted to both float and double etc but itself is not specialized for __numeric_type, and it is called for math functions eg. fma, it will cause ambiguity with test functio

[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-31 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/96171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Fix __clang_hip_cmath.hip for ambiguity (PR #101341)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Yaxun (Sam) Liu (yxsamliu) Changes If there is a type T which can be converted to both float and double etc but itself is not specialized for __numeric_type, and it is called for math functions eg. fma, it will cause ambiguity with

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -7668,6 +7669,47 @@ struct LoopIterationSpace final { Expr *FinalCondition = nullptr; }; +class ForSubExprChecker : public RecursiveASTVisitor { + const llvm::SmallSet *CollapsedLoopVarDecls; + VarDecl *ForbiddenVar; + SourceRange ErrLoc; + +public: + explicit ForSubE

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -7668,6 +7669,47 @@ struct LoopIterationSpace final { Expr *FinalCondition = nullptr; }; +class ForSubExprChecker : public RecursiveASTVisitor { + const llvm::SmallSet *CollapsedLoopVarDecls; + VarDecl *ForbiddenVar; + SourceRange ErrLoc; + +public: + explicit ForSubE

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -7668,6 +7669,47 @@ struct LoopIterationSpace final { Expr *FinalCondition = nullptr; }; +class ForSubExprChecker : public RecursiveASTVisitor { + const llvm::SmallSet *CollapsedLoopVarDecls; + VarDecl *ForbiddenVar; alexey-bataev wrote: `VarDecl *Forb

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -9069,7 +9147,8 @@ static bool checkOpenMPIterationSpace( Expr *OrderedLoopCountExpr, SemaOpenMP::VarsWithInheritedDSAType &VarsWithImplicitDSA, llvm::MutableArrayRef ResultIterSpaces, -llvm::MapVector &Captures) { +llvm::MapVector &Captures, +const l

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -9475,6 +9555,36 @@ static Expr *buildPostUpdate(Sema &S, ArrayRef PostUpdates) { return PostUpdate; } +class ForVarDeclFinder : public RecursiveASTVisitor { + int NestingDepth; alexey-bataev wrote: `int NestingDepth = 0;` https://github.com/llvm/llvm

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -9475,6 +9555,36 @@ static Expr *buildPostUpdate(Sema &S, ArrayRef PostUpdates) { return PostUpdate; } +class ForVarDeclFinder : public RecursiveASTVisitor { alexey-bataev wrote: final class and description https://github.com/llvm/llvm-project/pull/101

[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-31 Thread Rainer Orth via cfe-commits
rorth wrote: This patch broke the [Solaris/amd64](https://lab.llvm.org/staging/#/builders/120/builds/485) and [Solaris/sparcv9](https://lab.llvm.org/buildbot/#/builders/13/builds/1287) buildbots. https://github.com/llvm/llvm-project/pull/96171 ___ c

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-31 Thread Xiang Li via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-31 Thread Xiang Li via cfe-commits
@@ -245,6 +274,18 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) { << llvm::Triple::getEnvironmentTypeName(ST); FD->setInvalidDecl(); } +if (const auto *NT = FD->getAttr()) { + if (Ver < VersionTuple(6, 6)) { +Diag(NT->getLocation(), di

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-31 Thread Xiang Li via cfe-commits
@@ -245,6 +274,18 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) { << llvm::Triple::getEnvironmentTypeName(ST); FD->setInvalidDecl(); } +if (const auto *NT = FD->getAttr()) { python3kgae wrote: Renamed. https://github.com/llvm/llv

[clang] 7ab6433 - [libclang] Use check_linker_flag instead of llvm_check_linker_flag

2024-07-31 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2024-07-31T10:50:34-04:00 New Revision: 7ab643383fe49d5bb22e45610cb52476bf7a922e URL: https://github.com/llvm/llvm-project/commit/7ab643383fe49d5bb22e45610cb52476bf7a922e DIFF: https://github.com/llvm/llvm-project/commit/7ab643383fe49d5bb22e45610cb52476bf7a922e.diff

[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-31 Thread Louis Dionne via cfe-commits
ldionne wrote: @rorth Please check if this is still broken after https://github.com/llvm/llvm-project/commit/7ab643383fe49d5bb22e45610cb52476bf7a922e https://github.com/llvm/llvm-project/pull/96171 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -342,6 +342,57 @@ template class OMPVarListClause : public OMPClause { } }; +template class OMPDirectiveListClause : public OMPClause { alexey-bataev wrote: Why do you need this? https://github.com/llvm/llvm-project/pull/92731 ___

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -2013,6 +2064,184 @@ class OMPMergeableClause : public OMPClause { } }; +/// This represents the 'absent' clause in the '#pragma omp assume' +/// directive. +/// +/// \code +/// #pragma omp assume absent() +/// \endcode +/// In this example directive '#pragma omp assume'

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -2013,6 +2064,184 @@ class OMPMergeableClause : public OMPClause { } }; +/// This represents the 'absent' clause in the '#pragma omp assume' +/// directive. +/// +/// \code +/// #pragma omp assume absent() +/// \endcode +/// In this example directive '#pragma omp assume'

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-07-31 Thread Alexey Bataev via cfe-commits
@@ -2013,6 +2064,184 @@ class OMPMergeableClause : public OMPClause { } }; +/// This represents the 'absent' clause in the '#pragma omp assume' +/// directive. +/// +/// \code +/// #pragma omp assume absent() +/// \endcode +/// In this example directive '#pragma omp assume'

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Chen Zheng via cfe-commits
@@ -562,7 +562,7 @@ void AIX::addClangTargetOptions( CC1Args.push_back("-fno-sized-deallocation"); if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) + options::OPT_fno_err_pragma_

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread Sergei Barannikov via cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { +if (A->getOption().matches(options::OPT_mv8p

[clang] [clang] Fix self-capturing `__block` variables (PR #89475)

2024-07-31 Thread via cfe-commits
ille-apple wrote: Ping. https://github.com/llvm/llvm-project/pull/89475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/101336 >From e823d1e7eb3357fc5c15b614ac5fd94d331ac630 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 31 Jul 2024 10:12:59 -0400 Subject: [PATCH 1/2] Turn on mc_func check by default. --- clang/include/clang/D

[clang] Revert "[CMake][Fuchsia] Include libunwind and libc++abi in baremetal build" (PR #101340)

2024-07-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2360 Here is the relevant piece of the bu

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/101350 Recently HIP runtime changed dll name to amdhip64_n.dll on Windows, where n is ROCm major version number. Fix amdgpu-arch to search for amdhip64_n.dll on Windows. >From 8819e99b64f3293a758f8a81258a25c91fab6ef

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Qiongsi Wu via cfe-commits
@@ -562,7 +562,7 @@ void AIX::addClangTargetOptions( CC1Args.push_back("-fno-sized-deallocation"); if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) + options::OPT_fno_err_pragma_

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Recently HIP runtime changed dll name to amdhip64_n.dll on Windows, where n is ROCm major version number. Fix amdgpu-arch to search for amdhip64_n.dll on Windows. --- Full diff: https://github.com/llvm/

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/101336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. > > ADD: Sorry, I meant DataLayout, of course. > > Thanks for pointing this out. How does data layout affect the alignment of > constant string global variable symbols? They will be aligned to th

[clang] fa84297 - [clang][CUDA] Add 'noconvergent' function and statement attribute

2024-07-31 Thread via cfe-commits
Author: darkbuck Date: 2024-07-31T11:30:48-04:00 New Revision: fa842970027b6d2f0160ad42fa82a872bf8d8600 URL: https://github.com/llvm/llvm-project/commit/fa842970027b6d2f0160ad42fa82a872bf8d8600 DIFF: https://github.com/llvm/llvm-project/commit/fa842970027b6d2f0160ad42fa82a872bf8d8600.diff LOG:

[clang] [clang][CUDA] Add 'noconvergent' function and statement attribute (PR #100637)

2024-07-31 Thread via cfe-commits
https://github.com/darkbuck closed https://github.com/llvm/llvm-project/pull/100637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-07-31 Thread Brandon Wu via cfe-commits
@@ -4768,6 +4768,15 @@ static void handleCallConvAttr(Sema &S, Decl *D, const ParsedAttr &AL) { case ParsedAttr::AT_RISCVVectorCC: D->addAttr(::new (S.Context) RISCVVectorCCAttr(S.Context, AL)); return; + case ParsedAttr::AT_RISCVVLSCC: { +// If the riscv_abi_vl

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-07-31 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/100346 >From 15161b0b7637d52b6285624a4bf9f52a6664082c Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sun, 21 Jul 2024 09:49:11 -0700 Subject: [PATCH 1/5] [RISCV][VLS] Support RISCV VLS calling convention This patch a

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Chen Zheng via cfe-commits
@@ -562,7 +562,7 @@ void AIX::addClangTargetOptions( CC1Args.push_back("-fno-sized-deallocation"); if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) + options::OPT_fno_err_pragma_

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-07-31 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 commented: LGTM. Please wait for @AaronBallman 's approval. Thanks https://github.com/llvm/llvm-project/pull/101336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/98713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

2024-07-31 Thread Daniel M. Katz via cfe-commits
katzdm wrote: @zygoloid Friendly ping here, if you have a chance to take another look. https://github.com/llvm/llvm-project/pull/98671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-31 Thread Krystian Stasiowski via cfe-commits
@@ -1779,6 +1779,42 @@ void Parser::checkPotentialAngleBracket(ExprResult &PotentialTemplateName) { Priority); } +bool Parser::isMissingTemplateKeywordBeforeScope(bool AnnotateInvalid) { + assert(Tok.is(tok::coloncolon)); + Sema::DisableTypoCorrectionRAI

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-31 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/100425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread via cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { +if (A->getOption().matches(options::OPT_mv8p

[clang] [clang][CUDA] Add 'noconvergent' function and statement attribute (PR #100637)

2024-07-31 Thread Richard Smith via cfe-commits
zygoloid wrote: > Please also update the documentation for the attribute and the release notes. It looks like you may have overlooked the request to add release notes for this new feature. https://github.com/llvm/llvm-project/pull/100637 ___ cfe-com

[clang] [CMake][Fuchsia] Use standard spelling for Arm baremetal targets (PR #101302)

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

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Doing the lord's work 🙏 https://github.com/llvm/llvm-project/pull/101280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread Matt Arsenault via cfe-commits
@@ -31,16 +43,108 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread Matt Arsenault via cfe-commits
@@ -31,16 +43,108 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread Matt Arsenault via cfe-commits
@@ -31,16 +43,108 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-07-31 Thread Matt Arsenault via cfe-commits
@@ -31,16 +43,108 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread via cfe-commits
heiher wrote: > > > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. > > > ADD: Sorry, I meant DataLayout, of course. > > > > > > Thanks for pointing this out. How does data layout affect the alignment of > > constant string global variable symbols? > > They will be

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101108 >From 8d054ac3ada0e978fa1a663170090f033016edfe Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 17:48:24 -0400 Subject: [PATCH 1/6] [clang-doc] add support for block commands --- clang-tools

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101108 >From 8d054ac3ada0e978fa1a663170090f033016edfe Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 17:48:24 -0400 Subject: [PATCH 1/6] [clang-doc] add support for block commands --- clang-tools

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-31 Thread via cfe-commits
@@ -59,32 +59,63 @@ // HTML-SHAPE: class Shape // HTML-SHAPE: Defined at line 8 of file {{.*}}Shape.h +// HTML-SHAPE: brief +// HTML-SHAPE: Abstract base class for shapes. // HTML-SHAPE: Provides a common interface for different types of shapes. // HTML-SHAPE: Functions

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-31 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Could we simplify this even further by removing `DiagnosticConsumer::finish()` entirely, moving the code in `SDiagsWriter::finish()` to `SDiagsWriter::~SDiagsWriter()` and ensuring the **destructor** gets called even with `-disable-free`? Also, can you please create and li

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-31 Thread Richard Smith via cfe-commits
@@ -1779,6 +1779,42 @@ void Parser::checkPotentialAngleBracket(ExprResult &PotentialTemplateName) { Priority); } +bool Parser::isMissingTemplateKeywordBeforeScope(bool AnnotateInvalid) { + assert(Tok.is(tok::coloncolon)); + Sema::DisableTypoCorrectionRAI

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread Sergei Barannikov via cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { +if (A->getOption().matches(options::OPT_mv8p

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > > > This looks wrong. Preferred and ABI alignments should be set in > > > > ~Triple~. ADD: Sorry, I meant DataLayout, of course. > > > > > > > > > Thanks for pointing this out. How does data layout affect the alignment > > > of constant string global variable symbols?

[clang] 28a0792 - Fix typo: tyep -> type.

2024-07-31 Thread Benjamin Kramer via cfe-commits
Author: Brian Yahn Date: 2024-07-31T19:02:48+02:00 New Revision: 28a079223dd22f13ca51dfa8f5d51a9cd3514edf URL: https://github.com/llvm/llvm-project/commit/28a079223dd22f13ca51dfa8f5d51a9cd3514edf DIFF: https://github.com/llvm/llvm-project/commit/28a079223dd22f13ca51dfa8f5d51a9cd3514edf.diff LO

[clang] [NFCI][clang][analyzer] Make ProgramStatePartialTrait a template definition (PR #98150)

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

[clang] [clang] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-07-31 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH 01/13] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrow

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -18460,6 +18460,22 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/X->getType(), CGM.getHLSLRuntime().getLerpIntrinsic(), ArrayRef{X, Y, S}, nullptr, "hlsl.lerp"); } + case Builtin::BI__builtin_hlsl_elementwise_length: {

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-07-31 Thread Aaron Ballman via cfe-commits
@@ -16644,7 +16644,32 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, if (Action == AA_Passing_CFAudited) { DiagKind = diag::err_arc_typecheck_convert_incompatible_pointer; } else if (getLangOpts().CPlusPlus) { - DiagKind = diag::err_typeche

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-07-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! I think there may be a way we can implement this by updating the handling of `%diff` in `FormatDiagnostic()` in `Diagnostic.cpp`. That syntax only accepts two `QualType` objects and is used when we're going to report a d

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-07-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/101261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-07-31 Thread Aaron Ballman via cfe-commits
@@ -16644,7 +16644,32 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, if (Action == AA_Passing_CFAudited) { DiagKind = diag::err_arc_typecheck_convert_incompatible_pointer; } else if (getLangOpts().CPlusPlus) { - DiagKind = diag::err_typeche

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-07-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void func(int n) { +int grp[n][n]; +int (*ptr)[n]; + +for (int i = 0; i < n; i++) +ptr = &grp[i]; // expected-error {{incompatible assignment of pointers of variable-length array type 'int (*)[n]'

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-31 Thread Rainer Orth via cfe-commits
rorth wrote: Both bots are working again: thanks for the quick fix. https://github.com/llvm/llvm-project/pull/96171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread via cfe-commits
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args, Features.push_back("-hard-quad-float"); } + if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) { +if (A->getOption().matches(options::OPT_mv8p

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92103 >From 5908130604728b9aa9b70eeb2523d368df08e68d Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 14 May 2024 08:28:19 +0100 Subject: [PATCH 1/5] [Clang] Fix definition of layout-compatible to ignore empty

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-31 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/98713 >From ea6720f933774505f664ecb8de8f23b39e2facfb Mon Sep 17 00:00:00 2001 From: Koakuma Date: Sat, 13 Jul 2024 11:42:21 +0700 Subject: [PATCH 1/2] [SPARC][clang] Add -m(no-)v8plus flags handling Implement handling

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; ModuleID = 'D:\llvm-project\clang\test\CodeGenHLSL\builtins\length.hlsl' +sou

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl requested changes to this pull request. you need a `llvm/test/CodeGen/DirectX/length_error.ll file. sqrt doesn't support double. https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-07-31 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/101256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread Mital Ashok via cfe-commits
MitalAshok wrote: I am also looking to cherry-pick this for Clang 19 so there won't be a difference between Clang 19 (when `__is_layout_compatible` was added) and Clang 20 https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list c

[clang] f9827e6 - [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (#101280)

2024-07-31 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-07-31T10:38:32-07:00 New Revision: f9827e67ce2ccad863fac9d062eacbd60d829375 URL: https://github.com/llvm/llvm-project/commit/f9827e67ce2ccad863fac9d062eacbd60d829375 DIFF: https://github.com/llvm/llvm-project/commit/f9827e67ce2ccad863fac9d062eacbd60d829375.di

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-31 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >