[clang-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-04-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > unfortunately, LLVM's command-line argument framework doesn't allow us to > distinguish between "the option's value is `IWYU` because the flag > `--header-insertion=iwyu` appeared in the command line" and "the option's > value is `IWYU` because no `--header-insertion` f

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-23 Thread via cfe-commits
jeremyd2019 wrote: I'm fighting the tests on Windows - the hurd test I started from had `// UNSUPPORTED: system-windows` at the top, probably because they weren't interested in messing around with backslashes and .exe extensions. I don't know if the cross test will work right for the path to

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-23 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/135691 >From 949ec2a683faf53652b21a4c90206befa498bf4e Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 14 Apr 2025 10:37:59 -0700 Subject: [PATCH 1/2] [Clang] [Driver] add a Cygwin ToolChain Add a new Cygwin

[clang] [docs] Fix the use of word "dependent" and other typos in the C++ Modules Doc (PR #136719)

2025-04-23 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -477,21 +476,21 @@ When the ``-fmodules-embed-all-files`` flag are enabled, Clang explicitly emits code into the BMI file, the contents of the BMI file contain a sufficiently verbose representation to reproduce the original source file. -:sup:`1`` Input files: The source

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-23 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I'm fighting the tests on Windows - the hurd test I started from had `// > UNSUPPORTED: system-windows` at the top, probably because they weren't > interested in messing around with backslashes and .exe extensions. I don't > know if the cross test will work right for the path

[clang] [docs] Fix the use of word "dependent" and other typos in the C++ Modules Doc (PR #136719)

2025-04-23 Thread Chuanqi Xu via cfe-commits
@@ -477,21 +476,21 @@ When the ``-fmodules-embed-all-files`` flag are enabled, Clang explicitly emits code into the BMI file, the contents of the BMI file contain a sufficiently verbose representation to reproduce the original source file. -:sup:`1`` Input files: The source

[clang] da8f2d5 - Revert "[clang-format] Allow breaking before kw___attribute (#128623)"

2025-04-23 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-04-22T23:49:26-07:00 New Revision: da8f2d52423bb82b5d4e75cff3018704effe044f URL: https://github.com/llvm/llvm-project/commit/da8f2d52423bb82b5d4e75cff3018704effe044f DIFF: https://github.com/llvm/llvm-project/commit/da8f2d52423bb82b5d4e75cff3018704effe044f.diff LOG:

[clang] [docs] Fix the use of word "dependent" and other typos in the C++ Modules Doc (PR #136719)

2025-04-23 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/136719 >From 095e00202104240797e21c941be7f6256850c534 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Tue, 22 Apr 2025 15:24:20 +0200 Subject: [PATCH 1/4] [docs] Fix the use of "dependent" and "dependant" in th

[clang] [docs] Fix the use of word "dependent" and other typos in the C++ Modules Doc (PR #136719)

2025-04-23 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: I have no merge access yet, so I'll appreciate if someone click on the "merge" button https://github.com/llvm/llvm-project/pull/136719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] ae47f25 - [docs] Fix the use of word "dependent" and other typos in the C++ Modules Doc (#136719)

2025-04-23 Thread via cfe-commits
Author: Arseniy Zaostrovnykh Date: 2025-04-23T15:34:54+08:00 New Revision: ae47f2533709058d3442a34af783d8cd721b4177 URL: https://github.com/llvm/llvm-project/commit/ae47f2533709058d3442a34af783d8cd721b4177 DIFF: https://github.com/llvm/llvm-project/commit/ae47f2533709058d3442a34af783d8cd721b417

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -524,7 +523,9 @@ CIRGenTypes::arrangeCIRFunctionInfo(CanQualType returnType) { if (retInfo.canHaveCoerceToType() && retInfo.getCoerceToType() == nullptr) retInfo.setCoerceToType(convertType(fi->getReturnType())); - assert(!cir::MissingFeatures::opCallArgs()); + for

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @AaronBallman ! Again I appreciate your suggestion. I ran into some complexities when adding a test. It is precisely that this is a very internal API that is giving me some trouble. Since `clang/tools/libclang/CXString.h` is not an exposed header, I cannot really even add i

[clang] [clang] Enable making the module build stack thread-safe (PR #137059)

2025-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/137059 This PR makes another piece of the `CompilerInstance::cloneForModuleCompile()` result thread-safe: the module build stack. This data structure is used to detect cyclic dependencies between modules. The pro

[clang] [clang] Enable making the module build stack thread-safe (PR #137059)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR makes another piece of the `CompilerInstance::cloneForModuleCompile()` result thread-safe: the module build stack. This data structure is used to detect cyclic dependencies between modules. The p

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-23 Thread via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: lexi-nadia wrote: I believe this commit introduced a crash. Here's a minimal repro: ``` class Foo { public: virtual ~Foo

[clang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-23 Thread via cfe-commits
jofrn wrote: There is still a need for other such rules that we may not want to apply more generally though. For calling convention, that is target specific, and it could go into its own pass. https://github.com/llvm/llvm-project/pull/123609 ___ cfe-

[clang] [Clang][NFC] Use temporary instead of one use local variable when creating APValue (PR #137029)

2025-04-23 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/137029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-23 Thread via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang -### %s --target=i686-pc-windows-cygnus --sysroot=%S/Inputs/basic_cygwin_tree \ +// RUN: -resource-dir=%S/Inputs/resource_dir \ +// RUN: --stdlib=platform 2>&1 | FileCheck --check-prefix=CHECK %s +// CHECK: "-cc1" +// CHECK-SAME: "-resour

[clang] [CIR] Create CIR_TypedAttr common class (PR #136852)

2025-04-23 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **Apr 23, 5:00 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/136852). https://github.com/llvm/llvm-project/pull/136852 _

[clang] [CIR] Create CIR_TypedAttr common class (PR #136852)

2025-04-23 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/136852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-23 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: @@ -29,7 +29,6 @@ #ifdef __CYGWIN__ #include #include -#define _WIN32 1 #endif jeremyd2019 wrote: My updated versio

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-23 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: jeremyd2019 wrote: @mstorsjo maybe you could look at this PR too? sorry to bug you so much, but it doesn't seem like anyone else is very interested in cy

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @emaxx-google thanks for the reproducer. I will be off to C++Now soon, so it's unlikely I will have time to take a look at that in the next two weeks, sorry about that. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/4024 Here is the re

[clang] 55160e6 - [ConstEval] Fix crash when comparing strings past the end (#137078)

2025-04-23 Thread via cfe-commits
Author: Henrik G. Olsson Date: 2025-04-23T16:41:21-07:00 New Revision: 55160e6a89820f219eaa218fa02da2006213ed2c URL: https://github.com/llvm/llvm-project/commit/55160e6a89820f219eaa218fa02da2006213ed2c DIFF: https://github.com/llvm/llvm-project/commit/55160e6a89820f219eaa218fa02da2006213ed2c.di

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/15667 Here is th

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn edited https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16533 Here is the relevant piece of the

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/15716 Here is the relevant pie

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/21837 Here is

[clang] Revert "[ConstEval] Fix crash when comparing strings past the end" (PR #137088)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn closed https://github.com/llvm/llvm-project/pull/137088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/18865 Here is th

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-23 Thread Bob Wilson via cfe-commits
https://github.com/bob-wilson updated https://github.com/llvm/llvm-project/pull/137087 >From a7195bdc6d98f672344c25ea8794c434cc58e0ef Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 22 Apr 2025 09:24:49 -0700 Subject: [PATCH 1/2] [Clang] Add new -header-include-filtering=direct-per-file o

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/13648 Here is the relevant

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/14998 Here is the relevant pi

[clang] Eval string one past end reland (PR #137091)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes Relands #137078 after updating clang/test/AST/ByteCode/cxx20.cpp to account for diagnostic outputs that differ between Linux and macOS. --- Full diff: https://github.com/llvm/llvm-project/pull/137091.di

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] Eval string one past end reland (PR #137091)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/137091 Relands #137078 after updating clang/test/AST/ByteCode/cxx20.cpp to account for diagnostic outputs that differ between Linux and macOS. >From 92e524de8e568b47d8506f8d9156dc3f3d064aaa Mon Sep 17 00:00:00 2001 F

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Fangyi Zhou via cfe-commits
@@ -93,9 +76,8 @@ ProgramStateRef getWidenedLoopState(ProgramStateRef PrevState, RegionAndSymbolInvalidationTraits::TK_PreserveContents); } - return PrevState->invalidateRegions(Regions, getLoopCondition(LoopStmt), -

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Where is this new API expected to be used? An intended use can be found here https://github.com/swiftlang/llvm-project/pull/10524, where we try to pass up a collection of strings to the user, and we try not to create copies of the strings. https://github.com/llvm/llvm-pro

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, assert(builder.getInsertionBlock() && "expected valid basic block"); assert(!cir::MissingFeatures::opCallIndirect()); - return builder.createCallOp(callLoc, directFuncOp); + return b

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -18,22 +18,118 @@ using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType) { - void *buffer = operator new(totalSizeToAlloc(1)); +CIRGenFunctionInfo * +CIRGenFunctionInfo::create(CanQualType resultType, +

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/136810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -47,18 +98,51 @@ class CIRGenFunctionInfo final // This function has to be CamelCase because llvm::FoldingSet requires so. // NOLINTNEXTLINE(readability-identifier-naming) - static void Profile(llvm::FoldingSetNodeID &id, CanQualType resultType) { + static void Profil

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Fangyi Zhou via cfe-commits
@@ -645,6 +645,7 @@ struct StreamOperationEvaluator { SymbolRef StreamSym = nullptr; const StreamState *SS = nullptr; const CallExpr *CE = nullptr; + std::optional ElemRef; fangyi-zhou wrote: I'm not entirely sure whether I get your point correctly. Thi

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -32,8 +32,14 @@ void X8664ABIInfo::computeInfo(CIRGenFunctionInfo &funcInfo) const { // Top level CIR has unlimited arguments and return types. Lowering for ABI // specific concerns should happen during a lowering phase. Assume everything // is direct for now. - asse

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Title should start with `[CIR] ...`, more comments inline https://github.com/llvm/llvm-project/pull/136807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Clang][CodeGen] Emit fake uses before musttail calls (PR #136867)

2025-04-23 Thread Wolfgang Pieb via cfe-commits
wolfy1961 wrote: LGTM https://github.com/llvm/llvm-project/pull/136867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -47,18 +98,51 @@ class CIRGenFunctionInfo final // This function has to be CamelCase because llvm::FoldingSet requires so. // NOLINTNEXTLINE(readability-identifier-naming) - static void Profile(llvm::FoldingSetNodeID &id, CanQualType resultType) { + static void Profil

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -47,18 +98,51 @@ class CIRGenFunctionInfo final // This function has to be CamelCase because llvm::FoldingSet requires so. // NOLINTNEXTLINE(readability-identifier-naming) - static void Profile(llvm::FoldingSetNodeID &id, CanQualType resultType) { + static void Profil

[clang] [CIR] Introduce type aliases for records (PR #136387)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > It generates anonymous records for vtables and typeinfo oh right, that was it! thanks for double checking https://github.com/llvm/llvm-project/pull/136387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/132984 >From 8599450e27f0d866db8785f1840372583fc545a2 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 28 Mar 2025 09:02:12 -0700 Subject: [PATCH] [clang] Do not share ownership of `HeaderSearchOptions` ---

[clang] [Clang][NFC] Use temporary instead of one use local variable when creating APValue (PR #137029)

2025-04-23 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/137029 Static analysis flagged this code b/c we should have been using std::move when passing by value since the value is not used anymore. In this case the simpler fix is just to use a temporary value as many of the o

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-23 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > I'm looking at this patch in isolation, so its possible that the comments > here are addressed elasewhere. > > It looks like useful functionality to add to the bare metal driver. > > It also looks like there is some scope for some documentation, for users and > for tool

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: If you make it a canonical node, you also automatically don't get an `aka` in diagnostics, which might be an advantage (or not). Ie you avoid the aka in `size_t (aka 'unsigned long')` you currently get. https://github.com/llvm/llvm-project/pull/136542 __

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-23 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/137112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f5965f - [CIR] Introduce type aliases for records (#136387)

2025-04-23 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-23T10:52:35-07:00 New Revision: 0f5965fa9c67969e4de7374362b6af49bf400b3b URL: https://github.com/llvm/llvm-project/commit/0f5965fa9c67969e4de7374362b6af49bf400b3b DIFF: https://github.com/llvm/llvm-project/commit/0f5965fa9c67969e4de7374362b6af49bf400b3b.diff L

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
@@ -617,6 +617,9 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) { case Decl::OpenACCDeclare: emitGlobalOpenACCDecl(cast(decl)); break; + case Decl::Enum: +assert(!cir::MissingFeatures::generateDebugInfo() && "NYI"); bcardosolopes wrote: `ass

[clang] [llvm] Reland "[HLSL][RootSignature] Implement initial parsing of the descriptor table clause params" (PR #136740)

2025-04-23 Thread Finn Plummer via cfe-commits
@@ -90,36 +89,170 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = CurToken.TokKind; + + if (consumeExpectedToken(Toke

[clang] [C] Add (new) -Wimplicit-void-ptr-cast to -Wc++-compat (PR #136855)

2025-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/136855 >From 73a0a93e22976fd8ffdd5df70c459b648b7dd06d Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 23 Apr 2025 07:15:42 -0400 Subject: [PATCH 1/3] Diagnose implicit void * casts under -Wc++-compat ---

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-23 Thread via cfe-commits
jeremyd2019 wrote: It did turn out to be just one more slash issue. Test is passing now on Windows (and Linux, and Cygwin itself) https://github.com/llvm/llvm-project/pull/135691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Balazs Benics via cfe-commits
@@ -93,9 +76,8 @@ ProgramStateRef getWidenedLoopState(ProgramStateRef PrevState, RegionAndSymbolInvalidationTraits::TK_PreserveContents); } - return PrevState->invalidateRegions(Regions, getLoopCondition(LoopStmt), -

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Balazs Benics via cfe-commits
@@ -114,7 +128,8 @@ class SValExplainer : public FullSValVisitor { std::string VisitSymbolConjured(const SymbolConjured *S) { return "symbol of type '" + S->getType().getAsString() + - "' conjured at statement '" + printStmt(S->getStmt()) + "'"; + "'

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Erich Keane via cfe-commits
erichkeane wrote: > If you make it a canonical node, you also automatically don't get an `aka` in > diagnostics, which might be an advantage (or not). > > Ie you avoid the aka in `size_t (aka 'unsigned long')` you currently get. I don't think you'd WANT to avoid that, I would want a type-alias

[clang] [clang] Ensure correct copying of records with authenticated fields (PR #136783)

2025-04-23 Thread Oliver Hunt via cfe-commits
@@ -2801,6 +2801,10 @@ static bool isTriviallyCopyableTypeImpl(const QualType &type, if (type.hasNonTrivialObjCLifetime()) return false; + QualType::PrimitiveCopyKind PCK = type.isNonTrivialToPrimitiveCopy(); + if (PCK != QualType::PCK_Trivial && PCK != QualType::PCK_

[clang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-23 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/123609 >From 210b6d80bcfbbcd216f98199df386280724561e2 Mon Sep 17 00:00:00 2001 From: jofernau Date: Mon, 20 Jan 2025 04:51:26 -0800 Subject: [PATCH 01/12] [TargetVerifier][AMDGPU] Add TargetVerifier. This pass verifies

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-04-23 Thread Guy David via cfe-commits
guy-david wrote: Yeah, I realize it's misplaced, I am not familiar with that part of the project, see the first paragraph in the PR description. I don't really agree with your second point about breaking people's existing assumptions on UB :) I am willing to run correctness suites to further v

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Balazs Benics via cfe-commits
@@ -645,6 +645,7 @@ struct StreamOperationEvaluator { SymbolRef StreamSym = nullptr; const StreamState *SS = nullptr; const CallExpr *CE = nullptr; + std::optional ElemRef; steakhal wrote: Ah I completely missed the context. nvm. https://github.com/llv

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: Thanks! It looks like the new IR after this change doesn't pass verification, and presumably this causes the crash later: ``` $ cl

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This loop is using a bunch of traditional for loops instead of 'range-for' (and loops instead of algorithms!). It would be a vast improvement to replace those with std::algorithms if they end up being 'simple' enough, and at least range-for loops. htt

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2025-04-23 Thread David Blaikie via cfe-commits
@@ -169,6 +169,47 @@ See the discussion in the section about :ref:`merging locations` for examples of when the rule for dropping locations applies. +.. _NewInstLocations: + +Setting locations for new instructions +-- + +Whenever a new instru

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: Hm, reverting this change doesn't fix the verifier error, the issue still repros for me with this change reverted. Are we sure this

[clang] f418981 - [CIR] Create CIR_TypedAttr common class (#136852)

2025-04-23 Thread via cfe-commits
Author: Henrich Lauko Date: 2025-04-23T23:02:25+02:00 New Revision: f4189817df9b32903d0704028c8d2ea9b0ea5908 URL: https://github.com/llvm/llvm-project/commit/f4189817df9b32903d0704028c8d2ea9b0ea5908 DIFF: https://github.com/llvm/llvm-project/commit/f4189817df9b32903d0704028c8d2ea9b0ea5908.diff

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-23 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: CC @AaronBallman as a last resort. The reason for `CompilerInvocation` not sharing ownership of its sub-objects is given here: https://github.com/llvm/llvm-project/pull/133467#issuecomment-2762065443 https://github.com/llvm/llvm-project/pull/132984 _

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -71,6 +130,23 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, return builder.createCallOp(callLoc, directFuncOp); } +const CIRGenFunctionInfo & +CIRGenTypes::arrangeFreeFunctionType(CanQual fpt) { + SmallVector argTypes; + for (unsigned i = 0, e =

[clang] [clang][modules] Minor improvements to diagnosing `out of date` errors (PR #136612)

2025-04-23 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/136612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c9027c - [clang][Modules] Clarify error message when size check fails in lookupModuleFile

2025-04-23 Thread via cfe-commits
Author: Cyndy Ishida Date: 2025-04-23T10:55:39-07:00 New Revision: 3c9027c1d7aac0c1e54af13182f1b8f58d376115 URL: https://github.com/llvm/llvm-project/commit/3c9027c1d7aac0c1e54af13182f1b8f58d376115 DIFF: https://github.com/llvm/llvm-project/commit/3c9027c1d7aac0c1e54af13182f1b8f58d376115.diff

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/136854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > That is not possible, and this is exactly what I'm worried about with all > this discussion about making `size_t` more "built-in". `size_t` is specified > to be a typedef of a (platform-dependent) standard integer type, and it needs > to continue to behave that way; we ca

[clang] [Clang][NFC] Use temporary instead of one use local variable when creating APValue (PR #137029)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged this code b/c we should have been using std::move when passing by value since the value is not used anymore. In this case the simpler fix is just to use a temporary value as many of

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, assert(builder.getInsertionBlock() && "expected valid basic block"); assert(!cir::MissingFeatures::opCallIndirect()); - return builder.createCallOp(callLoc, directFuncOp); + return b

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1496,6 +1496,10 @@ def FuncOp : CIR_Op<"func", [ return getFunctionType().getReturnTypes(); } +// TODO(cir): this should be an operand attribute, but for now we just hard- +// wire this as a function. Will later add a $no_proto argument to this op. +

[clang] [CIR] Create CIR_TypedAttr common class (PR #136852)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/136852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: With template specialization resugaring, these being typedefs still help somewhat: https://compiler-explorer.com/z/qKxbYMEGq You have to make a bit of contortion to expose the intermediate type, but I think that's partly due to a different problem, where in diagnostics we don't

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-23 Thread Shilei Tian via cfe-commits
shiltian wrote: Hmm, this PR is much shorter than it used to be. https://github.com/llvm/llvm-project/pull/131838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL][RootSignature] Implement initial parsing of the descriptor table clause params" (PR #136740)

2025-04-23 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/136740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warning as error for fold expressions over comparison operators (PR #136836)

2025-04-23 Thread via cfe-commits
cor3ntin wrote: https://compiler-explorer.com/z/zoze5br4d it turns out that we already produce a warning for right fold... hum, this will require more work https://github.com/llvm/llvm-project/pull/136836 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-23 Thread Shilei Tian via cfe-commits
@@ -423,8 +423,8 @@ static void instantiateOMPDeclareVariantAttr( auto *FD = cast(New); auto *ThisContext = dyn_cast_or_null(FD->getDeclContext()); - auto &&SubstExpr = [FD, ThisContext, &S, &TemplateArgs](Expr *E) { -if (auto *DRE = dyn_cast(E->IgnoreParenImpCasts())

[clang] b8e420e - Reland "[HLSL][RootSignature] Implement initial parsing of the descriptor table clause params" (#136740)

2025-04-23 Thread via cfe-commits
Author: Finn Plummer Date: 2025-04-23T11:51:24-07:00 New Revision: b8e420e424b41f67019155055f4f600ba0454189 URL: https://github.com/llvm/llvm-project/commit/b8e420e424b41f67019155055f4f600ba0454189 DIFF: https://github.com/llvm/llvm-project/commit/b8e420e424b41f67019155055f4f600ba0454189.diff

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread John McCall via cfe-commits
rjmccall wrote: > > At least, it must ensure that `__size_t` is equivalent to `size_t` and > > generates the same mangled name. > > Is that possible? @rjmccall If `size_t` is a different type from `__size_t`, then `void foo(size_t);` declares a different entity from `void foo(__size_t);`. The

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Something being unspecified in the standard doesn't mean we're unconstrained. > In this case, it is unspecified because it is allowed to vary between > platforms, but platforms are required to specify what type `size_t` is, and > it is well-defined to write code based on

[clang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-23 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/123609 >From 210b6d80bcfbbcd216f98199df386280724561e2 Mon Sep 17 00:00:00 2001 From: jofernau Date: Mon, 20 Jan 2025 04:51:26 -0800 Subject: [PATCH 01/12] [TargetVerifier][AMDGPU] Add TargetVerifier. This pass verifies

  1   2   3   4   5   >