[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -168,20 +174,48 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -170,20 +173,49 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -4742,6 +4742,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.ClaimAllArgs(options::OPT_gen_cdb_fragment_path); } + if (TC.getTriple().isAMDGPU() && types::isOpenCL(Input.getType())) { +if (Args.getLastArg(options::OPT_mprintf_kind_EQ))

[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -26,28 +26,34 @@ using namespace llvm; #define DEBUG_TYPE "amdgpu-emit-printf" -static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg) { +static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg, + bool IsBuffered) { + const

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra requested changes to this pull request. https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra edited https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > > something is of the opinion that `std::is_integral::value` is not > > > > true. I don't have time right now to investigate further, but since > > > > this is the only change I did it is hi

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/78320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: @AaronBallman @erichkeane ping :) https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s +// expected-no-diagnostics + +auto ICE = [](auto a) { return [=]() { return 1; }; }; cor3ntin wrote: Can you reference the issue number in the test? https://github.com/llvm/llvm-project/pul

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: Thanks for this patch. Can you add a release note? Does this fix any of these issues ? (if so, can you add test for them? #76481 #70064 #63271 #61939 #45441 https://github.com/llvm/llvm-project/pull/78896 ___ cfe-commits mailing lis

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > something is of the opinion that `std::is_integral::value` is not > > > true. I don't have time right now to investigate further, but since this > > > is the only change I did it is highly likely

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s cor3ntin wrote: `-fsyntax-only` is suspicious, i would prefer a CodeGenTest that checks the mangle name Maybe moving the test to `test/CodeGenCXX/mangle-lambdas.cpp ` (or one of the other s

[clang-tools-extra] [clang-tidy] Add bugprone-chained-comparison check (PR #76365)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/76365 >From 5ece73a5b14e86172b900f4ae9d63d8fa1590d4a Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Mon, 25 Dec 2023 16:18:45 + Subject: [PATCH 1/7] [clang-tidy] Add bugprone-chained-comparison check Check that

[llvm] [clang-tools-extra] [clang-tidy] Add AllowImplicitlyDeletedCopyOrMove option to cppcoreguidelines-special-member-functions (PR #71683)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/71683 >From 5c6db0ec4850bed27f94839d0f018d66fa1c57f4 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 8 Nov 2023 13:31:28 + Subject: [PATCH] [clang-tidy] Add AllowImplicitlyDeletedCopyOrMove option to cppcor

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 @sam-mccall do you have any capacity to review this change? I'm happy to try and help, but I haven't really been involved in the development of the include-cleaner component, and based on the findings in my previous comment, the patch would benefit from

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -504,6 +504,15 @@ static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, HeaderVPBB->insert(BaseIV->getDefiningRecipe(), IP); } + VPTypeAnalysis TypeInfo(SE.getContext()); + if (TypeInfo.inferScalarType(BaseIV) != TypeInfo.inferScalarType(S

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1117,13 +1119,7 @@ void VPScalarIVStepsRecipe::execute(VPTransformState &State) { // Ensure step has the same type as that of scalar IV. Type *BaseIVTy = BaseIV->getType()->getScalarType(); - if (BaseIVTy != Step->getType()) { -// TODO: Also use VPDerivedIVRecipe

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. ayalz wrote: ```suggestion /// VPScalarCastRecipe is a r

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -362,6 +362,7 @@ class VPDef { // START: Phi-like recipes. Need to be kept together. VPBlendSC, VPPredInstPHISC, +VPScalarCastSC, ayalz wrote: Placed inside Phi-like recipes interval? https://github.com/llvm/llvm-project/pull/78113

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue {

[clang-tools-extra] [clang] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -164,6 +164,8 @@ bool VPRecipeBase::mayHaveSideEffects() const { auto *R = cast(this); return R->getUnderlyingInstr()->mayHaveSideEffects(); } + case VPScalarCastSC: +return false; ayalz wrote: nit: join the above group known to return false

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -230,7 +230,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) { return V->getUnderlyingValue()->getType(); }) .Case( - [](const VPWidenCastRecipe *R) { return R->getResultType(); }); + [](const VPWidenCast

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > > What is the relationship between this patch, and clangd 17's ["missing > > > include" > > > warning](https://clangd.llvm.org/guides/include-cleaner#missing-include-warning)? > > > Does the quick-fix for the "missing include" warning also respect these > > > config

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread via cfe-commits
dyung wrote: @aaupov I believe this change is somehow causing cmake failures on several bots I oversee, although I cannot explain why it passed when building your commit. For example: https://lab.llvm.org/buildbot/#/builders/139/builds/57628 ``` CMake Error at /home/buildbot/buildbot-root/llv

[clang-tools-extra] [libunwind] [libcxx] [llvm] [libc] [mlir] [compiler-rt] [lldb] [clang] [flang] [lld] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2024-01-21 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: I created a [branch](https://github.com/minglotus-6/llvm-project/tree/type_profile) and submitted the end-to-end implementation there. Besides (a [squashed version](https://github.com/llvm/llvm-project/commit/de71eacf04a236031be6f1b53168f8f566244297) of) this pull request,

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM with a few nits. Can you double check modules.json is inside `lib/` (`usr/lib/x86_64-linux-gnu{{/|\\}}modules.json`) instead of some directory under `include`? https://github.com/llvm/llvm-project/pull/76451 __

[clang] a31a600 - [docs] Update StandardCPlusPlusModules.rst with clang18

2024-01-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-22T14:24:33+08:00 New Revision: a31a60074717fc40887cfe132b77eec93bedd307 URL: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307 DIFF: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307.diff LO

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
@@ -6135,6 +6141,45 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain &TC) const { return std::string(Name); } +std::string Driver::GetStdModuleManifestPath(const Compilation &C, + const ToolChain &TC) const {

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain &TC) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-21 Thread via cfe-commits
https://github.com/chenshanzhi updated https://github.com/llvm/llvm-project/pull/78716 >From dcdf4a5825a402ab1392f61354c604a9cf965bdd Mon Sep 17 00:00:00 2001 From: Shanzhi Chen Date: Thu, 18 Jan 2024 11:40:09 + Subject: [PATCH] [Clang][AST] Fix a crash on attaching doc comments This crash

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/69133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 745883b - [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (#69133)

2024-01-21 Thread via cfe-commits
Author: Amir Ayupov Date: 2024-01-21T22:03:39-08:00 New Revision: 745883bba69007f1d2c5135f3d5b0f1efcfc82cd URL: https://github.com/llvm/llvm-project/commit/745883bba69007f1d2c5135f3d5b0f1efcfc82cd DIFF: https://github.com/llvm/llvm-project/commit/745883bba69007f1d2c5135f3d5b0f1efcfc82cd.diff L

[clang] [flang] [lld] [clang-tools-extra] [llvm] [libcxx] [lldb] [mlir] [compiler-rt] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-21 Thread Owen Pan via cfe-commits
owenca wrote: > @mydeveloperday, do you have an opinion on this pull request? It addresses > #78010 with minimal changes, or are you interested in exploring other > possibilities? It's weird to add such a top-level option to fix a bug and keep the current behavior. See https://github.com/llv

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Zoltán Böszörményi via cfe-commits
@@ -154,6 +154,46 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" ) set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 ) endif() +# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added in LLVM 10 (r345120) +if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "9

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Zoltán Böszörményi via cfe-commits
https://github.com/zboszor updated https://github.com/llvm/llvm-project/pull/78884 From 26e8eaaa9b0be1fdc146b5b4e8d285a2e8a2edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sun, 21 Jan 2024 07:59:02 +0100 Subject: [PATCH 1/3] libclc: add some missi

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Craig Hesling via cfe-commits
linux4life798 wrote: Thanks! https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 25063be - [RISCV] Replace Zvbb with Zvkb in the Zvk* combine tests in riscv-target-features.c. NFC

2024-01-21 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2024-01-21T21:18:43-08:00 New Revision: 25063bedb596943e546994a45710c79fdd6539e8 URL: https://github.com/llvm/llvm-project/commit/25063bedb596943e546994a45710c79fdd6539e8 DIFF: https://github.com/llvm/llvm-project/commit/25063bedb596943e546994a45710c79fdd6539e8.diff

[clang] 5ffe777 - [RISCV] Add Zvkb test to riscv-target-features.c. NFC

2024-01-21 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2024-01-21T21:18:43-08:00 New Revision: 5ffe777c4acd1051c4cebc8464c7e1ae5ca2f689 URL: https://github.com/llvm/llvm-project/commit/5ffe777c4acd1051c4cebc8464c7e1ae5ca2f689 DIFF: https://github.com/llvm/llvm-project/commit/5ffe777c4acd1051c4cebc8464c7e1ae5ca2f689.diff

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-21 Thread via cfe-commits
https://github.com/cor3ntin commented: Separate default-to-error warning sounds like the right approach given the fallout. We will need a way to identify that the shadowing declaration is the declaration the template parameter is attached to, so I suspect that change isn't trivial. I'll reve

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Matt Arsenault via cfe-commits
=?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ=?Message-ID: In-Reply-To: @@ -154,6 +154,46 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" ) set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 ) endif() +# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Matt Arsenault via cfe-commits
=?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ=?Message-ID: In-Reply-To: @@ -154,6 +154,46 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" ) set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 ) endif() +# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Matt Arsenault via cfe-commits
=?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ=?Message-ID: In-Reply-To: https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/78884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Matt Arsenault via cfe-commits
=?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Message-ID: In-Reply-To: https://github.com/arsenm approved this pull request. can probably drop all the versioning handling here https://github.com/llvm/llvm-project/pull/78884 ___ cfe-commits mailing li

[libcxx] [lld] [flang] [compiler-rt] [mlir] [libc] [libunwind] [openmp] [polly] [llvm] [libcxxabi] [lldb] [clang] [clang-tools-extra] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-21 Thread Hristo Hristov via cfe-commits
https://github.com/Zingam closed https://github.com/llvm/llvm-project/pull/77967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang[analyzer] Improve modeling of 'execv' and 'execvp' in StdLibraryFunctionsChecker (PR #78930)

2024-01-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes These functions always return -1 and set 'errno'. --- Full diff: https://github.com/llvm/llvm-project/pull/78930.diff 1 Files Affected: - (modified) clang/lib/Stat

[clang] [clang[analyzer] Improve modeling of 'execv' and 'execvp' in StdLibraryFunctionsChecker (PR #78930)

2024-01-21 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/78930 These functions always return -1 and set 'errno'. >From 74a43113ee4152eb0cb6aaeb4fbc917bcf0abcf8 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 22 Jan 2024 12:42:43 +0800 Subject: [PATCH] [clang[analyzer] I

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-21 Thread Owen Pan via cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); ASSERT_EQ(Tokens.size(), 19u) << Tokens; EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator); + + Tokens = annotate("void f()

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-21 Thread Owen Pan via cfe-commits
@@ -1071,6 +1071,37 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); ASSERT_EQ(Tokens.size(), 19u) << Tokens; EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator); + + Tokens = annotate("void f()

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-21 Thread Owen Pan via cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { "concept C = (!Foo) && Bar;"); owenca wrote: +1. You don't even need to create a pull request for this kind of NFC changes. https://github.com/llvm/l

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert closed https://github.com/llvm/llvm-project/pull/78901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 85337df - [X86][Driver] Enable feature ndd for -mapxf (#78901)

2024-01-21 Thread via cfe-commits
Author: Shengchen Kan Date: 2024-01-22T12:30:25+08:00 New Revision: 85337df9e36a10941faa14472b1a4ea0607bfced URL: https://github.com/llvm/llvm-project/commit/85337df9e36a10941faa14472b1a4ea0607bfced DIFF: https://github.com/llvm/llvm-project/commit/85337df9e36a10941faa14472b1a4ea0607bfced.diff

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Thanks! @phoebewang https://github.com/llvm/llvm-project/pull/78901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang] [flang] [lld] [lldb] [openmp] [llvm] [compiler-rt] [clang-tools-extra] [libc] [libcxx] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-21 Thread Petr Hosek via cfe-commits
petrhosek wrote: Please ignore 04c85587596ab10d885a957a00c8fa22740f15c1 which addresses a different issue, this is still broken in tip-of-tree. https://github.com/llvm/llvm-project/pull/76449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-21 Thread via cfe-commits
chenshanzhi wrote: @gribozavr Thanks for your reply! I'm really glad that I can get the explanation about the original aim of the relevant code from you! I do have considered merging the two loops as you recommended when I tried to solve the crash. But I got confused when I compared the impl

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/69133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][PGO] Add libunwind to list of stage1 runtimes (PR #78869)

2024-01-21 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/78869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] C++ Templates: Refactor and fix `TransformLambdaExpr`'s mishandling of TypeLocs (PR #78801)

2024-01-21 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/78801 >From 2f95a8ff5f79221c568d9793fcbbd664a22e23df Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Fri, 19 Jan 2024 13:42:46 -0800 Subject: [PATCH] Refactor and fix Lambda prototype instantiation when it's a

[clang] [Clang] Drop workaround for old gcc versions (PR #78803)

2024-01-21 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/78803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 71dbefa - [Clang] Drop workaround for old gcc versions (#78803)

2024-01-21 Thread via cfe-commits
Author: Yuxuan Chen Date: 2024-01-21T19:31:40-08:00 New Revision: 71dbefa446e60dcce86fc3f8531e50b1d12ce31f URL: https://github.com/llvm/llvm-project/commit/71dbefa446e60dcce86fc3f8531e50b1d12ce31f DIFF: https://github.com/llvm/llvm-project/commit/71dbefa446e60dcce86fc3f8531e50b1d12ce31f.diff L

[lldb] [openmp] [lld] [compiler-rt] [clang-tools-extra] [llvm] [clang] [libcxx] [mlir] [libc] [flang] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-21 Thread Petr Hosek via cfe-commits
petrhosek wrote: The `llvm-libc++-static-clangcl.cfg.in :: std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp` is failing on Windows with the following error: ``` Exit Code: 1 Command Output (stdout): -- # COMPILED WITH C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe C:

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

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

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

2024-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: A few additional notes: * I chose the value `1 << 20` for `MaxLinesToProcess` empirically to get `guessLanguage()` to return in about 1 second on my (average-for-a-developer-machine) hardware. I don't feel strongly about the value and I'm happy to go with a different on

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-21 Thread Owen Pan via cfe-commits
owenca wrote: > > It seems adding a boolean sub-option that targets double pairs of > > parentheses as I suggested before is feasible although a better name than > > `ConsecutiveParentheses` may be needed. > > I'm fine to fix but request a concrete suggestion or proposal before I spend > much

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert edited https://github.com/llvm/llvm-project/pull/78901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Shengchen Kan via cfe-commits
@@ -803,10 +803,10 @@ // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-pr

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

2024-01-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Nathan Ridge (HighCommander4) Changes guessLanguage() uses UnwrappedLineParser to process different preprocessor variants of a file. For large files with many preprocessor branches, the number of variants can be very large and the

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

2024-01-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/78925 guessLanguage() uses UnwrappedLineParser to process different preprocessor variants of a file. For large files with many preprocessor branches, the number of variants can be very large and the operation c

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Phoebe Wang via cfe-commits
@@ -803,10 +803,10 @@ // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-pr

[clang] [Clang] Drop workaround for old gcc versions (PR #78803)

2024-01-21 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/78803 >From 6841b80f5baf33ebdf4a9203c9079bffac1d589c Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Fri, 19 Jan 2024 14:41:45 -0800 Subject: [PATCH] Drop workaround for old gcc versions --- clang/lib/Sema/Tr

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-21 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/77699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG][NFC] Modify test cases to suit assigned default sysroot path (PR #77075)

2024-01-21 Thread via cfe-commits
Yunzezhu94 wrote: Gentle Ping. https://github.com/llvm/llvm-project/pull/77075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libc] [libunwind] [flang] [lld] [clang] [libcxxabi] [llvm] [lldb] [openmp] [mlir] [clang-tools-extra] [libcxx] [clang] static operators should evaluate object argument (PR #68485)

2024-01-21 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 01/15] [clang] static operators should evaluate object argumen

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I tried applying this patch to ROOT/Cling and it fails to build because > > something is of the opinion that `std::is_integral::value` is not > > true. I don't have time right now to investigate further, but since this is > > the only change I did it is highly likely that

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Shengchen Kan via cfe-commits
@@ -803,10 +803,10 @@ // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-pr

[clang] [X86][Driver] Enable feature ndd for -mapxf (PR #78901)

2024-01-21 Thread Phoebe Wang via cfe-commits
@@ -803,10 +803,10 @@ // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-pr

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Chuanqi Xu via cfe-commits
@@ -3924,6 +3925,154 @@ class ASTDeclContextNameLookupTrait { } // namespace +namespace { +class SpecializationsLookupTrait { + ASTWriter &Writer; + llvm::SmallVector DeclIDs; + +public: + using key_type = unsigned; + using key_type_ref = key_type; + + /// A start and en

[llvm] [clang] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-21 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,175 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +#define MY_MACRO_MIN(a, b) ((a) < (b) ? (a) : (b)) + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b;

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #78921)

2024-01-21 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/78921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-21 Thread Gedare Bloom via cfe-commits
gedare wrote: > > > Would `__attribute__((noreturn))`, `if ((i = j))`, `decltype((x))`, and > > > `while (((i + 1) * j - 2) * k > 3)` be formatted as `__attribute__(( > > > noreturn ))`, `if (( i = j ))`, `decltype(( x ))`, and `while ( ( ( i + 1 > > > ) * j - 2 ) * k > 3 )`, respectively? > >

[llvm] [clang] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-21 Thread via cfe-commits
https://github.com/heiher closed https://github.com/llvm/llvm-project/pull/78664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 890acf8 - [docs] Add llvm and clang release notes for the global-var code model attribute (#78664)

2024-01-21 Thread via cfe-commits
Author: hev Date: 2024-01-22T09:35:21+08:00 New Revision: 890acf8d382d70c07a589d5ab9b83e64841b9e96 URL: https://github.com/llvm/llvm-project/commit/890acf8d382d70c07a589d5ab9b83e64841b9e96 DIFF: https://github.com/llvm/llvm-project/commit/890acf8d382d70c07a589d5ab9b83e64841b9e96.diff LOG: [doc

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-21 Thread via cfe-commits
alexfh wrote: We've got a huge amount of fallout from this change too. The cleanup would require a lot of work. This compiler error (though useful) definitely needs to be a diagnostic with a separate disable flag with at least one release of grace period. For now, I suggest to revert the chang

[clang] [clang][analyzer][NFC] Simplify ranges in StdLibraryFunctionsChecker (PR #78886)

2024-01-21 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/78886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d9a65b - [clang][analyzer][NFC] Simplify ranges in StdLibraryFunctionsChecker (#78886)

2024-01-21 Thread via cfe-commits
Author: Ben Shi Date: 2024-01-22T09:31:32+08:00 New Revision: 1d9a65b220a92b59b0556ba8b3195b5346e71170 URL: https://github.com/llvm/llvm-project/commit/1d9a65b220a92b59b0556ba8b3195b5346e71170 DIFF: https://github.com/llvm/llvm-project/commit/1d9a65b220a92b59b0556ba8b3195b5346e71170.diff LOG:

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-21 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/77699 >From ff055d9c064d1fb359d59eeb47cb5f8c6c422bec Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Fri, 7 Jul 2023 17:28:47 -0600 Subject: [PATCH 1/5] Fix formatting of if statements with BlockIndent A bug with Blo

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-21 Thread via cfe-commits
@@ -29,6 +29,12 @@ namespace llvm { class StringRef; class SparcSubtarget : public SparcGenSubtargetInfo { + // Reserve*Register[i] - *#i is not available as a general purpose register. + BitVector ReserveGRegister; koachan wrote: Yeah, something like that

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-21 Thread via cfe-commits
@@ -98,9 +96,34 @@ BitVector SparcRegisterInfo::getReservedRegs(const MachineFunction &MF) const { for (unsigned n = 0; n < 31; n++) Reserved.set(SP::ASR1 + n); + for (size_t i = 0; i < SP::IntRegsRegClass.getNumRegs() / 4; ++i) { +// Mark both single register and

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #78921)

2024-01-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #76991. --- Full diff: https://github.com/llvm/llvm-project/pull/78921.diff 3 Files Affected: - (modified) clang/lib/Format/ContinuationIndenter.cpp (+2-1) - (modified) clang/lib/Format/Whitespace

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #78921)

2024-01-21 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/78921 Fixes #76991. >From bc3f566b7c512434179241796a2d7d4ac3e7b381 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 21 Jan 2024 17:14:53 -0800 Subject: [PATCH] [clang-format] Fix a bug in ContinuationIndenter Fixes

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
jimmy-zx wrote: @linux4life798 Thanks for pointing out! I've updated the naming to conform snake_case. https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx updated https://github.com/llvm/llvm-project/pull/77269 >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00 2001 From: Jimmy Z <51149050+jimmy...@users.noreply.github.com> Date: Mon, 8 Jan 2024 04:36:27 + Subject: [PATCH 1/4] [libclang/python] Expos

[clang] [llvm] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2024-01-21 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/74927 >From fd0bae41e2c3ed791a6a73affc9e1709e21ff880 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Wed, 29 Nov 2023 08:08:29 +0700 Subject: [PATCH 1/5] [SPARC] Support reserving arbitrary general purpose registers Thi

  1   2   3   4   >