[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-07 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/146859 >From 1077e164158965e824097542dc4c3ecc8821d6dc Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Thu, 3 Jul 2025 13:50:55 +0300 Subject: [PATCH 1/6] Add support for consteval if in ConditionBRVisitor --- clang/lib/S

[clang] [libclang][Cygwin] Provide unversioned DLL file alongside versioned one (PR #147132)

2025-07-07 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya updated https://github.com/llvm/llvm-project/pull/147132 >From 9198e98e6dd7a02c5c5b65e400d788b6bac3a3c3 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Sat, 28 Jun 2025 13:11:42 +0900 Subject: [PATCH 1/4] [libclang][Cygwin] Put unversioned DLL file aside of versione

[clang] [LifetimeSafety] Propagate loans using dataflow analysis (PR #147208)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/147208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang][Cygwin] Provide unversioned DLL file alongside versioned one (PR #147132)

2025-07-07 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: Updated for use relative path to link target. https://github.com/llvm/llvm-project/pull/147132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > > This did require some work to ensure that the cache doesn't have 'vars' > > that aren't inside of the loop, but Sema is taking care of that with a > > warning > > Because it's a warning, is there anything we can add to existing verifiers to > sanity check the invariant?

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". --

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-07-07 Thread via cfe-commits
https://github.com/yronglin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
@@ -55,7 +55,8 @@ namespace clang::tidy { namespace { #if CLANG_TIDY_ENABLE_STATIC_ANALYZER -static const char *AnalyzerCheckNamePrefix = "clang-analyzer-"; +static constexpr llvm::StringLiteral AnalyzerCheckNamePrefix = localspook wrote: I can't do that, it

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -1204,7 +1204,41 @@ class CIRGenFunction : public CIRGenTypeCache { void updateLoopOpParallelism(mlir::acc::LoopOp &op, bool isOrphan, OpenACCDirectiveKind dk); + // The OpenACC 'cache' construct actually applies to the 'loop' if present.

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > In some tentative parses, we would always consider `[` as the start of an > attribute - only `[[` should be. > > Fixes #63880 It is the start of an attribute: Microsoft-style attributes are single bracket rather than double bracket. https://github.com/llvm/llvm-project/

[clang] [clang][diagnostics] Refactor "warn_doc_container_decl_mismatch" to use enum_select (PR #147120)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/147120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH 1/3] [C23][Parser] Diagnostic for attribute declaration where stateme

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/147147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/147308 Fixes #147217 --- This PR addresses the parsing of attribute arguments by diagnosing and disallowing the `#` operator >From 8f1c383f8f84fb636af4a78e0ff504830f9272f5 Mon Sep 17 00:00:00 2001 From: Oleksandr

[clang] [clang-tools-extra] [clang] Extend SourceLocation to 64 bits. (PR #147292)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Why is this a new review? What changed from the last one I looked at? https://github.com/llvm/llvm-project/pull/147292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #147217 --- This PR addresses the parsing of attribute arguments by diagnosing and disallowing the `#` operator --- Full diff: https://github.com/llvm/llvm-project/pull/147308.diff 4 Files Affec

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/147219 >From a5e5e795e2b31295f781d2398e41f46785c0f18b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 7 Jul 2025 02:52:01 +0300 Subject: [PATCH 1/2] [Clang] accept @tparam on variable template partial

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/147219 >From a5e5e795e2b31295f781d2398e41f46785c0f18b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 7 Jul 2025 02:52:01 +0300 Subject: [PATCH 1/2] [Clang] accept @tparam on variable template partial

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Oleksandr T. via cfe-commits
@@ -291,6 +291,14 @@ void DeclInfo::fill() { TemplateParameters = CTPSD->getTemplateParameters(); break; } + case Decl::VarTemplatePartialSpecialization: { +const VarTemplatePartialSpecializationDecl *VTPSD = a-tarasyuk wrote: @AaronBallman than

[clang] [Clang] Set the FTM for trivial relocation (PR #142936)

2025-07-07 Thread via cfe-commits
EricWF wrote: @cor3ntin I think Apple Clang still complicates version detection, and we can't use `__has_builtin`, because that's returned true for version of Clang where it's "broken" from libc++'s perspective. I don't think @ldionne would feel comfortable shipping actual libc++ changes if

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -215,6 +215,9 @@ void addOpenMPDeviceRTL(const Driver &D, const llvm::opt::ArgList &DriverArgs, StringRef BitcodeSuffix, const llvm::Triple &Triple, const ToolChain &HostTC); +void addOpenCLBuiltinsLib(const Driver &D, const

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-07 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From e4b0ccd8e1ac579066c559e890c3d610bbf226fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Wed, 2 Jul 2025 10:14:20 +0200 Subject: [PATCH 1/5] [LLVM][WebAssembly] Implement branch hint

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
@@ -192,6 +192,31 @@ class CodeGenOptions : public CodeGenOptionsBase { return getProfileUse() == llvm::driver::ProfileCSIRInstr; } + /// Controls the various implementations for complex division. tarunprabhu wrote: I think that it should be moved, but

[clang] [clang-tools-extra] [clang]: `*noreturn` propagation in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-07 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth closed https://github.com/llvm/llvm-project/pull/145220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

2025-07-07 Thread Juan Besa via cfe-commits
https://github.com/JuanBesa updated https://github.com/llvm/llvm-project/pull/147060 >From d176aa31c18a4293be9b49da671270d349a323b7 Mon Sep 17 00:00:00 2001 From: juanbesa Date: Thu, 26 Jun 2025 07:42:55 -0700 Subject: [PATCH 1/2] Copied over everything --- .../readability/QualifiedAutoCheck.

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Design Overview (PR #126654)

2025-07-07 Thread via cfe-commits
https://github.com/bd1976bris edited https://github.com/llvm/llvm-project/pull/126654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Andrey Karlov (negativ) Changes ## Summary This PR extends `Clang`'s `CFG` analysis to automatically propagate `analyzer_noreturn` attributes through function call chains. When a function exclusively calls no-return functions, i

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Andrey Karlov (negativ) Changes ## Summary This PR extends `Clang`'s `CFG` analysis to automatically propagate `analyzer_noreturn` attributes through function call chains. When a function exclusively calls no-return functions, it is

[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

2025-07-07 Thread Juan Besa via cfe-commits
https://github.com/JuanBesa updated https://github.com/llvm/llvm-project/pull/147060 >From d176aa31c18a4293be9b49da671270d349a323b7 Mon Sep 17 00:00:00 2001 From: juanbesa Date: Thu, 26 Jun 2025 07:42:55 -0700 Subject: [PATCH 1/2] Copied over everything --- .../readability/QualifiedAutoCheck.

[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

2025-07-07 Thread Juan Besa via cfe-commits
@@ -174,6 +176,21 @@ void QualifiedAutoCheck::registerMatchers(MatchFinder *Finder) { void QualifiedAutoCheck::check(const MatchFinder::MatchResult &Result) { if (const auto *Var = Result.Nodes.getNodeAs("auto")) { +if (RespectOpaqueTypes) { JuanBesa wr

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Shunsuke Watanabe via cfe-commits
@@ -1023,12 +1023,12 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; def fcomplex_arithmetic_EQ : Joined<["-"], "fcomp

[clang] [clang-tools-extra] `Clang`: `*noreturn` propagation in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 1/3] Initial implementation --- .../bugprone/unchecked-optional

[clang] [clang-tools-extra] [Clang]: `*noreturn` propagation in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ded1426 - [clang][modules-driver] Add scanner to detect C++20 module presence (#145220)

2025-07-07 Thread via cfe-commits
Author: Naveen Seth Hanig Date: 2025-07-07T11:55:34+02:00 New Revision: ded142671663c404f4d9fb9ef4867b4fc680409a URL: https://github.com/llvm/llvm-project/commit/ded142671663c404f4d9fb9ef4867b4fc680409a DIFF: https://github.com/llvm/llvm-project/commit/ded142671663c404f4d9fb9ef4867b4fc680409a.d

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
@@ -2835,8 +2835,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) { if (!FD->isVariadic()) findConstructionContextsForArguments(C); -if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context)) - NoReturn = true; +if (!NoReturn) +

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 1/3] Initial implementation --- .../bugprone/unchecked-optional

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ ready_for_review https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

2025-07-07 Thread Juan Besa via cfe-commits
JuanBesa wrote: Thanks for the comments. I also think `IgnoreAliasing` is a better name. In that case the default should be `true` though right? I'll look into merging the tests into a single file, and see if I can figure out the matcher. https://github.com/llvm/llvm-project/pull/147060

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/146595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/146595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147275 When a specialization was ambiguous, we would mark it as invalid, even if the specialization occured in an immediate context. This would subsequently lead to scenarios where invalid specialization produced no

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Actually, before merging, did you manage to run this on any non-trivial projects to see if there are any false positives? I think this change is valuable and important but these sorts of changes can expose some false positives. If that is the case (or there are some noisy patt

[clang] 7a6435b - [DenseMap] Do not align pointer sentinel values (NFC) (#146595)

2025-07-07 Thread via cfe-commits
Author: Nikita Popov Date: 2025-07-07T12:47:41+02:00 New Revision: 7a6435bec59010e4bb2e1e52a9ba840ed152b4ce URL: https://github.com/llvm/llvm-project/commit/7a6435bec59010e4bb2e1e52a9ba840ed152b4ce DIFF: https://github.com/llvm/llvm-project/commit/7a6435bec59010e4bb2e1e52a9ba840ed152b4ce.diff

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/146595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/147221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Gábor Horváth via cfe-commits
@@ -438,13 +438,10 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) { return; } bool isTrivialBody = hasTrivialBody(CE); - // If a value is passed by const pointer to a function, - // we should not assume that it is initialized by the call, and we - // conservativel

[clang] [libcxx] [clang] Fix -Wuninitialized for values passed by const pointers (PR #147221)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! I have a nit inline for your consideration. https://github.com/llvm/llvm-project/pull/147221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes When a specialization was ambiguous, we would mark it as invalid, even if the specialization occured in an immediate context. This would subsequently lead to scenarios where invalid specialization produce

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/146859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] f34de0a - [clang-tidy] [NFC] Potential dereference of nullptr. (#143145)

2025-07-07 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2025-07-07T06:57:51-04:00 New Revision: f34de0a14fa9fac737f042dea3df986dd161adbe URL: https://github.com/llvm/llvm-project/commit/f34de0a14fa9fac737f042dea3df986dd161adbe DIFF: https://github.com/llvm/llvm-project/commit/f34de0a14fa9fac737f042dea3df986dd161adbe

[clang-tools-extra] [clang-tidy] [NFC] Potential dereference of nullptr. (PR #143145)

2025-07-07 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/143145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang][Cygwin] Use LLVM_EXPORTED_SYMBOL_FILE (*.def file) for Cygwin (PR #147278)

2025-07-07 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya created https://github.com/llvm/llvm-project/pull/147278 This is not mandatory but recommended for completeness and consistency with MinGW. >From 8b20535225bcbbf7153eb133217ebc87083a7a23 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Mon, 7 Jul 2025 19:30:52 +0900

[clang] [libclang][Cygwin] Use LLVM_EXPORTED_SYMBOL_FILE (*.def file) for Cygwin (PR #147278)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tomohiro Kashiwada (kikairoya) Changes This is not mandatory but recommended for completeness and consistency with MinGW. --- Full diff: https://github.com/llvm/llvm-project/pull/147278.diff 1 Files Affected: - (modified) clang/tools/l

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-07 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: > Yes, it's not mandatory but seems to be recommended. I will submit a new PR > later. https://github.com/llvm/llvm-project/pull/147278 https://github.com/llvm/llvm-project/pull/147108 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/147213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Make global variable constexpr (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/147301 >From bad855d41d4350f51af955a33c079f3f1cf605f3 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Mon, 7 Jul 2025 06:34:02 -0700 Subject: [PATCH] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` o

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I noticed there is a problem with __builtin_sycl_unique_stable_name and > sycl_kernel_etnry_point attribute. If I add this wrapping of > __builtin_sycl_unique_stable_name calls AND sycl_kernel_entry_point > attribute, the strings disappear from the IR. They are in here > ht

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] acb4fff - [NFC] Fix GCC warning on enum/non-enum ternary thanks to 438863a0

2025-07-07 Thread via cfe-commits
Author: erichkeane Date: 2025-07-07T06:59:37-07:00 New Revision: acb4fff866f95762b53560bcf7b3a3667e7a41fd URL: https://github.com/llvm/llvm-project/commit/acb4fff866f95762b53560bcf7b3a3667e7a41fd DIFF: https://github.com/llvm/llvm-project/commit/acb4fff866f95762b53560bcf7b3a3667e7a41fd.diff LO

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/146224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. Could we just use `StringLiteral` without `llvm::`? https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
@@ -55,7 +55,8 @@ namespace clang::tidy { namespace { #if CLANG_TIDY_ENABLE_STATIC_ANALYZER -static const char *AnalyzerCheckNamePrefix = "clang-analyzer-"; +static constexpr llvm::StringLiteral AnalyzerCheckNamePrefix = vbvictor wrote: ```suggestion static c

[clang] [clang][bytecode] Create a temporary for discarded CXXBindTemporaryExprs (PR #147303)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes So we run the destructor. --- Full diff: https://github.com/llvm/llvm-project/pull/147303.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+14-1) - (modified) clang/lib/AST/ByteCod

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. The changes look correct to me, but I added Eli and Alexey for some other opinions to be sure. https://github.com/llvm/llvm-project/pull/147163 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -7876,6 +7883,7 @@ static void AddMethodTemplateCandidateImmediately( // function template are combined with the set of non-template candidate // functions. TemplateDeductionInfo Info(CandidateSet.getLocation()); + auto Method = cast(MethodTmpl->getTemplatedDecl()

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147306 In some tentative parses, we would always consider `[` as the start of an attribute - only `[[` should be. Fixes #63880 >From b47ae00ae1971d0d57d2a4b5da1cf8f02a0c1194 Mon Sep 17 00:00:00 2001 From: Corentin J

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes In some tentative parses, we would always consider `[` as the start of an attribute - only `[[` should be. Fixes #63880 --- Full diff: https://github.com/llvm/llvm-project/pull/147306.diff 3 Files Affe

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -7757,7 +7762,9 @@ void Sema::AddMethodCandidate( Candidate.Viable = true; unsigned FirstConvIdx = PO == OverloadCandidateParamOrder::Reversed ? 1 : 0; - if (ObjectType.isNull()) + if (IgnoreExplicitObject) +; AaronBallman wrote: How bad is it to

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH 1/2] [Clang] Do not mark ambiguous specialization invalid. When

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-07 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: The test in issue https://github.com/llvm/llvm-project/issues/146335 doesn't seem to be crashing for me! You are using it as a LIT test for the patch. Shouldn't there be a use of a `parallel-for` as the issue's title suggest? https://github.com/llvm/llvm-project/pull/146772 __

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-07-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @kbrav Are you still working on this? @AaronBallman left a few comments https://github.com/llvm/llvm-project/pull/127924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread Jakub Kuderski via cfe-commits
kuhar wrote: Good catch, now we have an example of what I suspected might be an issue in https://github.com/llvm/llvm-project/pull/146595#pullrequestreview-2976918106 https://github.com/llvm/llvm-project/pull/146595 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fix feature guards for SVE2p1 builtins available in SME{2}. (PR #147086)

2025-07-07 Thread Kerry McLaughlin via cfe-commits
@@ -569,34 +569,39 @@ static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, // * When compiling for SVE only, the caller must be in non-streaming mode. // * When compiling for both SVE and SME, the caller can be in either mode. if (BuiltinType == SemaARM::Veri

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -747,6 +747,10 @@ Bug Fixes in This Version - Fixed an infinite recursion when checking constexpr destructors. (#GH141789) - Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264) - Fixed a bug when use unicode character name in ma

[clang] 45d6792 - [clang][OpenMP] Fix signed v unsigned comparison

2025-07-07 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-07-07T09:15:10-05:00 New Revision: 45d679218aebdac5c9818be211d8e3a517c944c3 URL: https://github.com/llvm/llvm-project/commit/45d679218aebdac5c9818be211d8e3a517c944c3 DIFF: https://github.com/llvm/llvm-project/commit/45d679218aebdac5c9818be211d8e3a517c944c3

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/147301 >From bad855d41d4350f51af955a33c079f3f1cf605f3 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Mon, 7 Jul 2025 06:34:02 -0700 Subject: [PATCH 1/2] [clang-tidy][NFC] Prefer `constexpr llvm::StringLitera

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm a little concerned about the semi-canonical nature of this type, requiring the separate 'getCanonicalSizeType' esque functions, which should just be either stored as a CanQualType or compared properly. That said, for hte most part I like this change

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -721,7 +721,8 @@ static bool matchesStlAllocatorFn(const Decl *D, const ASTContext &Ctx) { (MD->getNumParams() != 1 && MD->getNumParams() != 2)) return false; - if (MD->parameters()[0]->getType().getCanonicalType() != Ctx.getSizeType()) + if (MD->parameters()[0

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -696,11 +696,17 @@ void TypeLocWriter::VisitPipeTypeLoc(PipeTypeLoc TL) { void TypeLocWriter::VisitBitIntTypeLoc(clang::BitIntTypeLoc TL) { addSourceLocation(TL.getNameLoc()); } + erichkeane wrote: Another unrelated change. https://github.com/llvm/llvm-p

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

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

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2595,8 +2595,12 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Align = static_cast(Width); } } + erichkeane wrote: Unrelated change? https://github.com/llvm/llvm-project/pull/143653

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -1002,14 +1002,14 @@ RValue CodeGenFunction::EmitCoroutineIntrinsic(const CallExpr *E, } case llvm::Intrinsic::coro_size: { auto &Context = getContext(); -CanQualType SizeTy = Context.getSizeType(); +CanQualType SizeTy = Context.getCanonicalSizeType(); -

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". +SignedSiz

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -5613,3 +5613,16 @@ HLSLAttributedResourceType::findHandleTypeOnResource(const Type *RT) { } return nullptr; } + +StringRef PredefinedSugarType::getName(Kind KD) { + switch (KD) { + case Kind::SizeT: +return "__size_t"; + case Kind::SignedSizeT: +return "__si

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -7248,6 +7248,12 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + llvm_unreachable("This type does not need to be transfor

[clang] [cir-translate] Fix crash issue where the data layout string is missing (PR #147209)

2025-07-07 Thread Henrich Lauko via cfe-commits
@@ -82,12 +85,17 @@ llvm::LogicalResult prepareCIRModuleDataLayout(mlir::ModuleOp mod, // Data layout is fully determined by the target triple. Here we only pass the // triple to get the data layout. + llvm::IntrusiveRefCntPtr diagID( + new clang::DiagnosticIDs); +

[clang-tools-extra] [clang-tidy][NFC] fix compilation by disambiguating equality operator (PR #147048)

2025-07-07 Thread Gregor Jasny via cfe-commits
https://github.com/gjasny updated https://github.com/llvm/llvm-project/pull/147048 >From f1ff857dd5a6751255884b4fa4c347f7fe7b7a2a Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 4 Jul 2025 13:19:22 +0100 Subject: [PATCH] [clang-tidy] fix compilation by disambiguating equality operator

[libclc] ea68589 - [libclc] Reduce include usage in OpenCL builtins (#146840)

2025-07-07 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-07-07T10:20:28+01:00 New Revision: ea685890b8b22c401bd7c5ec0b233349b479a029 URL: https://github.com/llvm/llvm-project/commit/ea685890b8b22c401bd7c5ec0b233349b479a029 DIFF: https://github.com/llvm/llvm-project/commit/ea685890b8b22c401bd7c5ec0b233349b479a029.diff

<    1   2   3   4   5   6   >