[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-10 Thread Richard Smith via cfe-commits
@@ -1230,11 +1230,26 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S, JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); + const DeclStmt *RangeDS = cast(S.getRangeStmt()); + const VarDecl *RangeV

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/86960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-10 Thread David Pagan via cfe-commits
https://github.com/ddpagan closed https://github.com/llvm/llvm-project/pull/87278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,285 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,66 @@ +//=== SocketMsgSupport.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -71,6 +101,18 @@ ListeningSocket::ListeningSocket(ListeningSocket &&LS) Expected ListeningSocket::createUnix(StringRef SocketPath, int MaxBacklog) { + // Identify instances where the target socket address already exist

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -43,8 +44,7 @@ constexpr size_t SOCKET_ADDR_MAX_LENGTH = sizeof(sockaddr_un::sun_path); constexpr size_t BASEPATH_MAX_LENGTH = SOCKET_ADDR_MAX_LENGTH - SOCKET_FILE_NAME.length(); -// How long should the module build daemon sit ideal before exiting -constexpr int Timeou

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -133,31 +133,42 @@ void ModuleBuildDaemonServer::setupDaemonEnv() { // Creates unix socket for IPC with frontends void ModuleBuildDaemonServer::createDaemonSocket() { - Expected MaybeServerListener = - llvm::ListeningSocket::createUnix(SocketPath); - - if (llvm::Erro

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -237,18 +251,24 @@ int cc1modbuildd_main(ArrayRef Argv) { if (!validBasePathLength(BasePath)) { errs() << "BasePath '" << BasePath << "' is longer then the max length of " << std::to_string(BASEPATH_MAX_LENGTH) << '\n'; -return 1; +return EXIT_FAILUR

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,278 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht edited https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht edited https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht approved this pull request. https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d347235 - [Flang] responds to Clang Tidy feedback (#87847)

2024-04-10 Thread via cfe-commits
Author: Christopher Di Bella Date: 2024-04-10T13:15:22-07:00 New Revision: d347235bddbeba2a72d94ebe9d8f98dc675c3776 URL: https://github.com/llvm/llvm-project/commit/d347235bddbeba2a72d94ebe9d8f98dc675c3776 DIFF: https://github.com/llvm/llvm-project/commit/d347235bddbeba2a72d94ebe9d8f98dc675c377

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/87847 ___ 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 bugprone-exception-rethrow check (PR #86448)

2024-04-10 Thread via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > One thing I noticed you bring up on Discourse and which I agree is probably > for the better: this pr can just be about introducing an effect system; > actually using it can be deferred to a follow-up pr. This pr is already big > enough if you consider just those changes, an

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread via cfe-commits
Sirraide wrote: > Yeah, when things settle down from this latest round of feedback, I'll back > out as much as possible for "phase two". In case that helps, imo it’s mainly the stuff in `AnalysisBasedWarnings.cpp` that is kind of separate from everything else; everything else can probably jus

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde created https://github.com/llvm/llvm-project/pull/88317 Making the clang resource headers into an interface library instead of a custom target means that we can attach the header search paths to the library. Targets that "link" against this library will automaticall

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Evan Wilde (etcwilde) Changes Making the clang resource headers into an interface library instead of a custom target means that we can attach the header search paths to the library. Targets that "link" against this library will auto

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. This seems like a step in the right direction - avoiding custom targets is generally better. https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
@@ -501,6 +501,10 @@ add_header_target("windows-resource-headers" ${windows_only_files}) add_header_target("utility-resource-headers" ${utility_files}) get_clang_resource_dir(header_install_dir SUBDIR include) +target_include_directories(clang-resource-headers INTERFACE + $

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
aganea wrote: > This patch doesn`t improve my usage, it seems I'm hitting a different > codepath than you do. I'll investigate. Ah I see, the commit https://github.com/llvm/llvm-project/commit/b768a8c1db85b9e84fd8b356570a3a8fbe37acf6 didn't make it in time for the 18.x branch. The issue I'm s

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea approved this pull request. Otherwise this PR LGTM. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
@@ -201,6 +201,21 @@ class ErrorDummyFileSystem : public DummyFileSystem { } }; +/// A version of \c DummyFileSystem that aborts on \c status() to test that +/// \c exists() is being used. +class NoStatusDummyFileSystem : public DummyFileSystem { +public: + ErrorOr status(c

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-10 Thread Eli Friedman via cfe-commits
@@ -1230,11 +1230,26 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S, JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); + const DeclStmt *RangeDS = cast(S.getRangeStmt()); + const VarDecl *RangeV

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
@@ -501,6 +501,10 @@ add_header_target("windows-resource-headers" ${windows_only_files}) add_header_target("utility-resource-headers" ${utility_files}) get_clang_resource_dir(header_install_dir SUBDIR include) +target_include_directories(clang-resource-headers INTERFACE + $

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Not sure @jansvoboda11 perhaps if we want to cherry pick > [b768a8c](https://github.com/llvm/llvm-project/commit/b768a8c1db85b9e84fd8b356570a3a8fbe37acf6) > on `release/18.x`? Or should we land just a simple PR with just the function > change above? I can try pulling b76

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I'd like to see a unit test specific to `DependencyScanningFilesystem`, similar to what I have here: https://github.com/llvm/llvm-project/pull/68645. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde updated https://github.com/llvm/llvm-project/pull/88317 >From 753df93a4fc054328c0b7caacc1064c283ced8ec Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 14 Mar 2024 18:11:24 -0700 Subject: [PATCH] Make clang resource headers an interface library Making the clang

[clang] [HLSL] Remove an unnecessary .ll file in clang/test/SemaHLSL/. (PR #87346)

2024-04-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/87346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Resolve review feedback, and 'backfilled' three affected tests in `clang/test/CodeGen`. Now `ninja check-llvm check-clang check-compiler-rt` passed locally. https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing li

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -635,7 +635,8 @@ static void computeFunctionSummary( HasIndirBranchToBlockAddress || HasIFuncCall; GlobalValueSummary::GVFlags Flags( F.getLinkage(), F.getVisibility(), NotEligibleForImport, - /* Live = */ false, F.isDSOLocal(), F.c

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -432,6 +432,18 @@ class GlobalValueSummary { /// Sububclass discriminator (for dyn_cast<> et al.) enum SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }; + enum ImportKind : unsigned { +// The global value definition corresponding to the summary sho

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -2072,6 +2072,23 @@ void LLParser::parseOptionalVisibility(unsigned &Res) { Lex.Lex(); } +static GlobalValueSummary::ImportKind +parseOptionalImportType(lltok::Kind Kind) { + GlobalValueSummary::ImportKind Res; + switch (Kind) { + default: +Res = GlobalValueSummary

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -16,13 +16,13 @@ ^3 = gv: (guid: 2, summaries: (function: (module: ^1, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 10, calls: ((callee: ^15, relbf: 256, tail: 1) ; Summaries with different linkage types. -^4 =

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -564,6 +581,12 @@ class GlobalValueSummary { bool canAutoHide() const { return Flags.CanAutoHide; } + bool shouldImportAsDec() const { minglotus-6 wrote: this makes sense, done. https://github.com/llvm/llvm-project/pull/87597 _

[clang] [llvm] [HLSL][SPIRV] Add any intrinsic lowering (PR #88325)

2024-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/88325 - `CGBuiltin.cpp` - Switch to using `CGM.getHLSLRuntime().get##NAME##Intrinsic()` - `CGHLSLRuntime.h` - Add any to backend intrinsic abstraction - `IntrinsicsSPIRV.td` - Add any intrinsic to SPIR-V. - `SPIRVIns

[clang] [llvm] [HLSL][SPIRV] Add any intrinsic lowering (PR #88325)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes - `CGBuiltin.cpp` - Switch to using `CGM.getHLSLRuntime().get##NAME##Intrinsic()` - `CGHLSLRuntime.h` - Add any to backend intrinsic abstraction - `IntrinsicsSPIRV.td` - Add any intrinsic to SPIR-V. - `SPIR

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From c2b2cd03e1d8f92b1df814e6312158b8820b790d Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 9 Apr 2024 11:22:44 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow a

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Artem Chikin via cfe-commits
artemcm wrote: > I'd like to see a unit test specific to `DependencyScanningFilesystem`, > similar to what I have here: #68645. Done! Added one in `DependencyScanningFilesystemTest.cpp`. Thank you. https://github.com/llvm/llvm-project/pull/88152 ___

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/7] implement wraps attribute Signed-off-by: Justin Stitt ---

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr { static unsigned sizeOfTrailingObjects(bool HasFPFeatures) { return HasFPFeatures * sizeof(FPOptionsOverride); } + + /// Do one of the subexpressions have the wraps attribute? + bool oneOfWraps(const ASTContext

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def Wraps : DeclOrTypeAttr { + let Spellings = [GNU<"wraps">]; JustinStitt wrote: Right, I had that originally. I shouldn't have changed it :) Anyway

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def Wraps : DeclOrTypeAttr { + let Spellings = [GNU<"wraps">]; + let Subjects = SubjectList<[Var, TypedefName, Field]>; + let Documentation = [WrapsDocs]; +}

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -2237,6 +2237,21 @@ bool BinaryOperator::isNullPointerArithmeticExtension(ASTContext &Ctx, return true; } +bool BinaryOperator::oneOfWraps(const ASTContext &Ctx) const { + llvm::SmallVector Both = {getLHS(), getRHS()}; JustinStitt wrote: I had trouble

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -147,6 +147,15 @@ struct BinOpInfo { return UnOp->getSubExpr()->getType()->isFixedPointType(); return false; } + + /// Does the BinaryOperator have the wraps attribute? + /// If so, we can ellide overflow sanitizer checks. + bool oneOfWraps() const { +cons

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -6954,6 +6954,23 @@ static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, ::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type); } +static void handleWrapsAttr(QualType &Type, const ParsedAttr &Attr, +TypeProcess

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff eec41d2f8d81b546d7b97648cca6b2d656104bd3 a2f63982920f22d795c4971800bcc5cb55356570 --

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/8] implement wraps attribute Signed-off-by: Justin Stitt ---

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +// forw

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
JustinStitt wrote: The most recent commits have massively simplified checking for the wrapping attributes. FWIW, the tests I am running are: βœ… `$ llvm-lit clang/test/CodeGen/integer-overflow.c -v` βœ… `$ llvm-lit clang/test/CodeGen/unsigned-overflow.c -v` βœ… `$ llvm-lit clang/test/Sema/attr-wraps.

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/9] implement wraps attribute Signed-off-by: Justin Stitt ---

[clang] [llvm] [llvm][clang] Trace VFS calls (PR #88326)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88326 None >From 540321e84dbd3c5687cfcc60e9deec79d790896e Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 10 Apr 2024 16:03:19 -0700 Subject: [PATCH] [llvm][clang] Trace VFS calls --- clang/include/clang/

[clang] [llvm] [llvm][clang] Trace VFS calls (PR #88326)

2024-04-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff e72c949c15208ba3dd53a9cebfee02734965a678 540321e84dbd3c5687cfcc60e9deec79d790896e --

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM. Would be nice to land Ben's change separately. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Seems like some tests failed on Linux. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Thanks, this seems good! https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/68645 >From fce5325720bcc945baed5923e00d09d84daf58e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 9 Oct 2023 10:14:17 -0700 Subject: [PATCH 1/8] [clang] Move lookup filename into function --- .../Depend

[clang] 6ef4450 - [clang] Fix -Wunused-function in CGStmtOpenMP.cpp (NFC)

2024-04-10 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-04-11T07:37:12+08:00 New Revision: 6ef4450705473e5cccb025219e8980999f456b71 URL: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71 DIFF: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71.diff LOG: [

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-10 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: it seems that the test depends on if certain android runtime libraries are present or not in the resource dir (without per-target runtime directory since that's still an issue on Android). perhaps the tests need `-resource-dir` to make them more hermetic? anyway, will revert,

[clang] be10070 - Revert "[Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin"

2024-04-10 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2024-04-10T23:41:51Z New Revision: be10070f91b86a6f126d2451852242bfcb2cd366 URL: https://github.com/llvm/llvm-project/commit/be10070f91b86a6f126d2451852242bfcb2cd366 DIFF: https://github.com/llvm/llvm-project/commit/be10070f91b86a6f126d2451852242bfcb2cd366.diff LOG

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,51 @@ +//===- DependencyScanningFilesystemTest.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +// forw

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-10 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From af735f3216dd5db9dcaf164892f3f573731701ec Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 3 Apr 2024 20:58:46 -0700 Subject: [PATCH 1/2] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; l

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-10 Thread Dan Liew via cfe-commits
@@ -1599,6 +1599,13 @@ defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attri LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag, NegFlag>; +defm experimental_late_parse_attributes : BoolFOption<"experimental-late-parse-attributes",

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-04-10 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Draft PR at https://github.com/llvm/llvm-project/pull/88333. https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [NFC][Clang] Improve const correctness for IdentifierInfo (PR #79365)

2024-04-10 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/79365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/88334 Currently, clang looks for compiler-rt only from the normalized triple subdir. While if we are configured with a non-normalized triple with -DLLVM_DEFAULT_TARGET_TRIPLE, such as triples without vendor section, c

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: YunQiang Su (wzssyqa) Changes Currently, clang looks for compiler-rt only from the normalized triple subdir. While if we are configured with a non-normalized triple with -DLLVM_DEFAULT_TARGET_TRIPLE, such as triples without vendor

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-10 Thread Joshua Batista via cfe-commits
@@ -119,8 +119,10 @@ struct BuiltinTypeDeclBuilder { ResourceKind RK, bool IsROV) { if (Record->isCompleteDefinition()) return *this; -Record->addAttr(HLSLResourceAttr::CreateImplicit(Record->getASTContext(), -

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread Nikita Popov via cfe-commits
nikic wrote: Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use nneg instead of KnownBits after this change? https://github.com/llvm/llvm-project/pull/88299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/87578 >From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 3 Apr 2024 13:15:59 -0700 Subject: [PATCH 1/4] implement binding type error for t/cbuffers and rwbuffers -

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Could you share the rest of the "no transitive change" patches, or at least > their outline? I'm curious what else goes into making that work. Oh, I haven't started them. The patch in my mind includes two at least: (1) Add a new block recording the semantical hash value of t

[clang] 51f1681 - [clang-format] Don't merge a short block for SBS_Never (#88238)

2024-04-10 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-10T19:06:29-07:00 New Revision: 51f1681424f1a8ccf1e3432d71c341e799597171 URL: https://github.com/llvm/llvm-project/commit/51f1681424f1a8ccf1e3432d71c341e799597171 DIFF: https://github.com/llvm/llvm-project/commit/51f1681424f1a8ccf1e3432d71c341e799597171.diff LOG:

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/88238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/88343 Relate gcc patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648789.html >From 88e99b1f3f99140e13f7acb8e7e10162dc1694a0 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Wed, 10 Apr 2024 16:49:05 +080

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes Relate gcc patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648789.html --- Full diff: https://github.com/llvm/llvm-project/pull/88343.diff 2 Files Affected: - (modified) clang/lib/Basic/Target

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Shengchen Kan via cfe-commits
@@ -954,6 +954,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__CCMP__"); if (HasCF) Builder.defineMacro("__CF__"); + if (HasEGPR && HasPush2Pop2 && HasPPX && HasNDD) KanRobert wrote: Add comment `Condition

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM with a suggestion https://github.com/llvm/llvm-project/pull/88343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa converted_to_draft https://github.com/llvm/llvm-project/pull/88334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/88343 >From 88e99b1f3f99140e13f7acb8e7e10162dc1694a0 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Wed, 10 Apr 2024 16:49:05 +0800 Subject: [PATCH 1/2] [X86] Define __APX_F__ when APX is enabled. Relate gcc patch:

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
@@ -954,6 +954,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__CCMP__"); if (HasCF) Builder.defineMacro("__CF__"); + if (HasEGPR && HasPush2Pop2 && HasPPX && HasNDD) FreddyLeaf wrote: 4929d88 https://githu

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you provide CMake configure command and the compiler-rt file paths? I am not sure we need more changes to clangDriver. https://github.com/llvm/llvm-project/pull/88334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [lld] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 75edf0c - [NFC] [Serialization] Avoid accessing PendingBodies as much as possible

2024-04-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-11T11:08:58+08:00 New Revision: 75edf0c18c777d69df7cfc6462e5233649bd47d4 URL: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4 DIFF: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4.diff LO

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine &Path) { return Result->getStatus(); } +bool +DependencyScanningWorkerFilesystem::exists(const Twine &Path) { + llvm::ErrorOr Status = status(Path); jansvoboda11 wrote: Would be g

[clang] XFAIL clang/Driver/test/compress.c on AIX (PR #87269)

2024-04-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you edit the description to state which command fails on AIX? These tests all contain `-###` to stop after clangDriver completes. And `clang --target=powerpc-ibm-aix -fintegrated-as -Wa,-compress-debug-sections -c a.c '-###'` seems to work for me. https://github.com/llvm/ll

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88352 See commit 51f1681424f1. >From 3ecf27d15646345f43703f5a361bd9766307ebf4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 21:22:05 -0700 Subject: [PATCH] [clangd] Fix test case due to clang-format bu

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Owen Pan (owenca) Changes See commit 51f1681424f1. --- Full diff: https://github.com/llvm/llvm-project/pull/88352.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/unittests/HoverTests.cpp (+3-1) ``diff

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Owen Pan (owenca) Changes See commit 51f1681424f1. --- Full diff: https://github.com/llvm/llvm-project/pull/88352.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/unittests/HoverTests.cpp (+3-1) ``diff diff --git

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread via cfe-commits
goldsteinn wrote: > Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use > nneg instead of KnownBits after this change? yeah we could. Should I do a survey of existing folds first to ensure we don't incorrectly keep flags (like with `trunc nuw/nsw`) before integrating to

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88354 A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. >From ecff8db824552872ba055fdc0bca42b1a0386c39 Mon Sep 17 00:00:

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. --- Patch is 24.36 KiB, truncated to 20.00 KiB below,

<    1   2   3   4   5   >