[clang] [clang][c++20] Fix code coverage mapping crash with generalized NTTPs (PR #85837)

2024-04-09 Thread Eli Friedman via cfe-commits
@@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder } void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) { -Visit(OVE->getSourceExpr()); +if (const Expr *SE = OVE->getSourceExpr()) efriedma-quic wrote: If you have a BinaryConditionalOper

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

2024-04-09 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] f48895a - [C11] Claim conformance to WG14 N1514

2024-04-09 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-04-09T13:57:36-04:00 New Revision: f48895a8be517be058153385438ad64fa09d4883 URL: https://github.com/llvm/llvm-project/commit/f48895a8be517be058153385438ad64fa09d4883 DIFF: https://github.com/llvm/llvm-project/commit/f48895a8be517be058153385438ad64fa09d4883.diff

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-09 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > I'm not convinced I have sufficient tests, so I'm especially interested in > some help figuring out what else to test and how to go about it. I don't > believe we need to test library behavior here because Clang does not provide > any library support for complex types in free

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-09 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I'm not convinced I have sufficient tests, so I'm especially interested in > > some help figuring out what else to test and how to go about it. I don't > > believe we need to test library behavior here because Clang does not > > provide any library support for complex t

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Alexey Bataev via cfe-commits
@@ -52,8 +57,18 @@ class SemaOpenACC : public SemaBase { SourceLocation getEndLoc() const { return ClauseRange.getEnd(); } +OpenACCDefaultClauseKind getDefaultClauseKind() const { + assert(ClauseKind == OpenACCClauseKind::Default); + return std::get(Details)

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Alexey Bataev via cfe-commits
@@ -51,6 +51,36 @@ class OpenACCClauseWithParams : public OpenACCClause { SourceLocation getLParenLoc() const { return LParenLoc; } }; +// A 'default' clause, has the optional 'none' or 'present' argument. alexey-bataev wrote: ```suggestion /// A 'default'

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Alexey Bataev via cfe-commits
@@ -52,8 +57,18 @@ class SemaOpenACC : public SemaBase { SourceLocation getEndLoc() const { return ClauseRange.getEnd(); } +OpenACCDefaultClauseKind getDefaultClauseKind() const { + assert(ClauseKind == OpenACCClauseKind::Default); alexey-bataev

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Alexey Bataev via cfe-commits
@@ -66,6 +96,8 @@ template class OpenACCClauseVisitor { switch (C->getClauseKind()) { case OpenACCClauseKind::Default: + VisitOpenACCDefaultClause(*static_cast(C)); alexey-bataev wrote: Can you make it just `cast(C)`? https://github.com/llvm/ll

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Alexey Bataev via cfe-commits
@@ -419,6 +419,29 @@ enum class OpenACCDefaultClauseKind { Invalid, }; +template +inline StreamTy &PrintOpenACCDefaultClauseKind(StreamTy &Out, alexey-bataev wrote: ```suggestion inline StreamTy &printOpenACCDefaultClauseKind(StreamTy &Out, ``` https://g

[clang-tools-extra] [clang-tidy] Allow renaming macro arguments (PR #87792)

2024-04-09 Thread Edwin Vane via cfe-commits
revane wrote: Already done. Unless you had something else in mind? https://github.com/llvm/llvm-project/pull/87792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/87627 >From f4917dcf99664442d262226cd1ce1058646d7a55 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 3 Apr 2024 17:09:24 -0500 Subject: [PATCH 1/9] [flang][Frontend] Implement printing defined macros via

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
@@ -49,15 +51,21 @@ class Definition { TokenSequence Apply(const std::vector &args, Prescanner &); + void Print(llvm::raw_ostream &out, llvm::StringRef macroName = "") const; + private: static TokenSequence Tokenize(const std::vector &argNames, const TokenSequen

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
@@ -49,15 +51,21 @@ class Definition { TokenSequence Apply(const std::vector &args, Prescanner &); + void Print(llvm::raw_ostream &out, llvm::StringRef macroName = "") const; kparzysz wrote: Done. https://github.com/llvm/llvm-project/pull/87627 _

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
@@ -46,6 +49,38 @@ bool Definition::set_isDisabled(bool disable) { return was; } +void Definition::Print( +llvm::raw_ostream &out, llvm::StringRef macroName) const { + if (!isFunctionLike_) { +// If it's not a function-like macro, then just print the replacement. +

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/88135 >From b0595276f2b8d74d036ff9bf94c5baea86a57f17 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 8 Apr 2024 14:23:17 -0700 Subject: [PATCH 1/2] g This is a combination of 3 commits. [OpenACC] Implement Def

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-09 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > > > I'm not convinced I have sufficient tests, so I'm especially interested > > > in some help figuring out what else to test and how to go about it. I > > > don't believe we need to test library behavior here because Clang does > > > not provide any library support for compl

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: How is this code used outside of LLVM? Why do people want to use _without_ LLVM? Just curious. https://github.com/llvm/llvm-project/pull/87627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

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

2024-04-09 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From fdf95d6c9186b91cf39a988e3baaa21a9cabe6a1 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Thu, 6 Oct 2022 15:58:23 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow a

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Peter Klausler via cfe-commits
klausler wrote: > How is this code used outside of LLVM? Why do people want to use _without_ > LLVM? Just curious. There are people who want to construct tools to analyze or restructure Fortran programs outside of the context of compilation, and need to have access to a good parse tree or sym

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: > How is this code used outside of LLVM? Why do people want to use _without_ > LLVM? Just curious. I can see language features in IDE like vscode being a good candidate. https://github.com/llvm/llvm-project/pull/87627 ___ cfe-commi

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

2024-04-09 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] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-09 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: Is building LLVMSupport and maybe a few other components a barrier, or do they just not want to do that? https://github.com/llvm/llvm-project/pull/87627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-09 Thread Aaron Ballman via cfe-commits
@@ -1127,9 +1148,9 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // wb and WB are allowed, but a mixture of cases like Wb or wB is not. We // explicitly do not support the suffix in C++ as an extension because a // library-based UDL tha

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-09 Thread Aaron Ballman via cfe-commits
@@ -1117,6 +1118,26 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [NFC][Clang] Fix static analyzer concern (PR #88179)

2024-04-09 Thread via cfe-commits
https://github.com/elizabethandrews created https://github.com/llvm/llvm-project/pull/88179 Fix static analyzer concerns about dereferencing null values. >From b5eef2f7be6a109b490090b3854f40e0d5e415a2 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 9 Apr 2024 11:45:38 -0700 Subject

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-09 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/87268 >From 9b5781108081565e4009c3809eab623387655f1c Mon Sep 17 00:00:00 2001 From: komalverma04 Date: Mon, 1 Apr 2024 22:43:10 +0530 Subject: [PATCH 1/6] [clang-tidy] Add ignoringParenImpCasts in hasAnyArgument

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/88182 At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default. This does not work for targets that actually use a different value for the default / generic AS

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

2024-04-09 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] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alex Voicu (AlexVlx) Changes At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default. This does not work for targets that actually use a different value for the default /

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 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 8795822f6ae2e82e23f7fd87a84d6d273e6c04ac 453e96aafd02bd19f44c0383acb74b930d2767c9 --

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

2024-04-09 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-09 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea commented: Thanks for the change! Quite interestingly I was just looking precisely at this issue today :smile: Things are worst on Windows, where mini-filter drivers kick-in and bring performance to its knees. I'll try your patch, see how that improves my usage! http

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

2024-04-09 Thread Alexandre Ganea via cfe-commits
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine &Path) { return Result->getStatus(); } +bool +DependencyScanningWorkerFilesystem::exists(const Twine &Path) { + auto Status = status(Path); aganea wrote: The return type is unclea

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > querying a modules global AS from the target, rather than from the data > layout (some DL's are incomplete, e.g. SPIRV's) That is a bug in those DataLayouts https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > querying a modules default AS from the target, rather than assuming it's 0 I do think this should likely be part of the DataLayout. We have defaults for globals, alloca and functions, but no generic "give me the address space for `void *`"-like thing in LLVM itself. https://gi

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/88182 >From 426e74cabb003eb5dc83adf347a5800d49bc87b7 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 18 Mar 2024 11:49:12 + Subject: [PATCH 1/5] Start migrating away from the embedded assumption that the defa

[clang] [NFC][Clang] Fix static analyzer concern (PR #88179)

2024-04-09 Thread via cfe-commits
https://github.com/elizabethandrews updated https://github.com/llvm/llvm-project/pull/88179 >From dbc50cba12b17bea9002c87b35fb3b4d551ddf7e Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 9 Apr 2024 11:45:38 -0700 Subject: [PATCH] [NFC][Clang] Fix static analyzer concern Fix static

[clang] [NFC][Clang] Fix static analyzer concern (PR #88179)

2024-04-09 Thread via cfe-commits
https://github.com/elizabethandrews ready_for_review https://github.com/llvm/llvm-project/pull/88179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Fix static analyzer concern (PR #88179)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (elizabethandrews) Changes Fix static analyzer concerns about dereferencing null values. --- Full diff: https://github.com/llvm/llvm-project/pull/88179.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/InterpState.h (+5-1)

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/88182 >From 426e74cabb003eb5dc83adf347a5800d49bc87b7 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 18 Mar 2024 11:49:12 + Subject: [PATCH 1/6] Start migrating away from the embedded assumption that the defa

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Why can't we just declare that the "generic" address-space must always be 0? The specific numbers we use for address-spaces are completely arbitrary anyway. https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing

[clang] 4bc4c7b - [NFC] Change name of two helper functions to match naming conventions

2024-04-09 Thread via cfe-commits
Author: erichkeane Date: 2024-04-09T13:07:31-07:00 New Revision: 4bc4c7baed1a4ef13a0964fbf97f4dc1560de592 URL: https://github.com/llvm/llvm-project/commit/4bc4c7baed1a4ef13a0964fbf97f4dc1560de592 DIFF: https://github.com/llvm/llvm-project/commit/4bc4c7baed1a4ef13a0964fbf97f4dc1560de592.diff LO

[clang] [OpenACC] Implement Default clause for Compute Constructs (PR #88135)

2024-04-09 Thread Erich Keane via cfe-commits
@@ -419,6 +419,29 @@ enum class OpenACCDefaultClauseKind { Invalid, }; +template +inline StreamTy &PrintOpenACCDefaultClauseKind(StreamTy &Out, erichkeane wrote: Note I noticed that we got this wrong in the other two places in this file ( where I copied t

[clang] 6393482 - [Static Analyzer] Add handling of the `-nostdlibinc` option to ccc-analyzer (#88017)

2024-04-09 Thread via cfe-commits
Author: Ziqing Luo Date: 2024-04-09T13:09:52-07:00 New Revision: 63934821d56f4d366f61048ed6060978bbde1bc6 URL: https://github.com/llvm/llvm-project/commit/63934821d56f4d366f61048ed6060978bbde1bc6 DIFF: https://github.com/llvm/llvm-project/commit/63934821d56f4d366f61048ed6060978bbde1bc6.diff LO

[clang] Add handling of the `-nostdlibinc` option to ccc-analyzer (PR #88017)

2024-04-09 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/88017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Eli Friedman via cfe-commits
@@ -4551,6 +4554,7 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction( llvm::Function *F = llvm::Function::Create(FTy, llvm::Function::ExternalLinkage, + getDataLayout().getProgramAddressSpace(), efriedma-quic wrote:

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Eli Friedman via cfe-commits
@@ -3581,8 +3582,10 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject( isExternallyVisible(TPO->getLinkageAndVisibility().getLinkage()) ? llvm::GlobalValue::LinkOnceODRLinkage : llvm::GlobalValue::InternalLinkage; - auto *GV = new llvm::

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > Why can't we just declare that the "generic" address-space must always be 0? > The specific numbers we use for address-spaces are completely arbitrary > anyway. https://github.com/CTSRD-CHERI/llvm-project/issues/621 is what I wrote up for CHERI LLVM, but is a bit terse if you

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/88186 Makes it possible to export fixes from running llvm-lit on a clang-tidy test. To enable, modify the RUN invocation directly in the test with the new -export flag. llvm-lit will report the test passed and fixes ca

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Edwin Vane (revane) Changes Makes it possible to export fixes from running llvm-lit on a clang-tidy test. To enable, modify the RUN invocation directly in the test with the new -export flag. llv

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread John McCall via cfe-commits
rjmccall wrote: It's very uncommon for LLVM to need to come up with an address space on its own, as opposed to just propagating the original address space of some memory / operation as chosen by the frontend. LLVM occasionally creates new storage allocations, but usually they're (non-escaping

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > Why can't we just declare that the "generic" address-space must always be 0? > The specific numbers we use for address-spaces are completely arbitrary > anyway. If we were to do this, some targets would need to change to accomodate it; it would also p

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 2950283dddab03c183c1be2d7de9d4999cc86131...596037423faeebf01759158b5a93a3e933978941 clang

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > It's very uncommon for LLVM to need to come up with an address space on its > own, as opposed to just propagating the original address space of some memory > / operation as chosen by the frontend. LLVM occasionally creates new storage > allocations, but

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Offload][NFC] Remove `omp_` prefix from offloading entries (PR #88071)

2024-04-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2248164 - Revert "[clang] Move state out of `PreprocessorOptions` (1/n) (#86358)"

2024-04-09 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2024-04-09T13:26:45-07:00 New Revision: 2248164a9ab791a3ed1b9586dc340b5303155021 URL: https://github.com/llvm/llvm-project/commit/2248164a9ab791a3ed1b9586dc340b5303155021 DIFF: https://github.com/llvm/llvm-project/commit/2248164a9ab791a3ed1b9586dc340b5303155021.diff L

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread John McCall via cfe-commits
rjmccall wrote: > Why can't we just declare that the "generic" address-space must always be 0? > The specific numbers we use for address-spaces are completely arbitrary > anyway. I don't think this works; there's nothing that LLVM could possibly do with a generic AS that would justify it bein

[clang] [InstallAPI] Tie lifetime of FE objects to DylibVerifier (PR #88189)

2024-04-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/88189 A few verification checks need to happen until all AST's have been traversed, specifically for zippered framework checking. To keep source location until that time valid, hold onto to references of FrontendR

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

2024-04-09 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-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 631ac048e4b8fcbc242be54f48e5bf432a6a5b3d Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski created https://github.com/llvm/llvm-project/pull/88190 ROCm installation path is used for finding and automatically linking required bitcode libraries for OpenMP AMDGPU offload. >From 8782af25c5946dc33342798c36c7d64569d16ab5 Mon Sep 17 00:00:00 2001 From: Dom

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > > querying a modules global AS from the target, rather than from the data > > layout (some DL's are incomplete, e.g. SPIRV's) That is a bug in those DataLayouts Do we spell out the requirement somewhere? I am only asking because, for example, [neither

[clang] [InstallAPI] Tie lifetime of FE objects to DylibVerifier (PR #88189)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes A few verification checks need to happen until all AST's have been traversed, specifically for zippered framework checking. To keep source location until that time valid, hold onto to references of Front

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dominik Adamski (DominikAdamski) Changes ROCm installation path is used for finding and automatically linking required bitcode libraries for OpenMP AMDGPU offload. --- Full diff: https://github.com/llvm/llvm-project/pull/88190.diff 5 Fi

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread John McCall via cfe-commits
rjmccall wrote: > I'm not quite sure how to parse this comment, could you explain what you have > in mind here? The problem is precisely that the FE assumes 0 is fine / picks > it by default, which ends up into dangerzones when e.g. a target happened to > use 0 to point to private (stack). I f

[clang-tools-extra] [clang-tidy] Allow renaming macro arguments (PR #87792)

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/87792 >From c354f7f0be526fe41a56198c5d0ca434a8ad0bfe Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Fri, 5 Apr 2024 11:06:01 -0400 Subject: [PATCH] [clang-tidy] Allow renaming macro arguments Although the identifier-n

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

2024-04-09 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. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > > I'm not quite sure how to parse this comment, could you explain what you > > have in mind here? The problem is precisely that the FE assumes 0 is fine / > > picks it by default, which ends up into dangerzones when e.g. a target > > happened to use 0 to point to private (stack

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > > querying a modules global AS from the target, rather than from the data > > > layout (some DL's are incomplete, e.g. SPIRV's) > > That is a bug in those DataLayouts > > Do we spell out the requirement somewhere? I am only asking because, for > example, [neither SPIR

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -201,3 +201,24 @@ ! RUN: -nogpulibc %s 2>&1 \ ! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s ! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu" + +! RUN: rm -rf %t/Inputs + +! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \ +! RUN: --off

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -1340,7 +1340,8 @@ def hip_link : Flag<["--"], "hip-link">, Group, HelpText<"Link clang-offload-bundler bundles for HIP">; def no_hip_rt: Flag<["-"], "no-hip-rt">, Group, HelpText<"Do not link against HIP runtime libraries">; -def rocm_path_EQ : Joined<["--"], "rocm-pat

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + // Check ROCm path if specified + const ToolChain &TC = getToolChain(); + TC.getDev

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/88190 >From 8782af25c5946dc33342798c36c7d64569d16ab5 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Tue, 9 Apr 2024 14:35:26 -0500 Subject: [PATCH 1/2] [Flang][AMDGPU] Add rocm-path flag ROCm installation

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread John McCall via cfe-commits
rjmccall wrote: > Libcall emission needs to know what AS to use for pointer arguments to things > like __sync/__atomic implementations and various string-y mem*/str* > functions. That's the main one that comes to mind from our experience in > CHERI LLVM, and current LLVM just assumes that's AS

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-09 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > I'm not quite sure how to parse this comment, could you explain what you > > have in mind here? The problem is precisely that the FE assumes 0 is fine / > > picks it by default, which ends up into dangerzones when e.g. a target > > happened to use 0 to point to private (stac

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -201,3 +201,24 @@ ! RUN: -nogpulibc %s 2>&1 \ ! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s ! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu" + +! RUN: rm -rf %t/Inputs + +! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \ +! RUN: --off

[clang] [llvm] [mlir] [Offload][NFC] Remove `omp_` prefix from offloading entries (PR #88071)

2024-04-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/88071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 470aefb - [Offload][NFC] Remove `omp_` prefix from offloading entries (#88071)

2024-04-09 Thread via cfe-commits
Author: Joseph Huber Date: 2024-04-09T15:50:15-05:00 New Revision: 470aefb240dee7d791875284b9917bf641ca971a URL: https://github.com/llvm/llvm-project/commit/470aefb240dee7d791875284b9917bf641ca971a DIFF: https://github.com/llvm/llvm-project/commit/470aefb240dee7d791875284b9917bf641ca971a.diff

[clang] [clang][frontend] Make DumpModuleInfoAction emit the full macro (PR #85745)

2024-04-09 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese requested changes to this pull request. Generally when we get the definition of a macro we loop over the tokens, for example: ```c++ SmallString<128> SpellingBuffer; bool First = true; for (const auto &T : MI.tokens()) { if (!First && T.hasLeadingSpace())

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Dominik Adamski via cfe-commits
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + // Check ROCm path if specified + const ToolChain &TC = getToolChain(); + TC.getDev

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Dominik Adamski via cfe-commits
@@ -1340,7 +1340,8 @@ def hip_link : Flag<["--"], "hip-link">, Group, HelpText<"Link clang-offload-bundler bundles for HIP">; def no_hip_rt: Flag<["-"], "no-hip-rt">, Group, HelpText<"Do not link against HIP runtime libraries">; -def rocm_path_EQ : Joined<["--"], "rocm-pat

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -1340,7 +1340,8 @@ def hip_link : Flag<["--"], "hip-link">, Group, HelpText<"Link clang-offload-bundler bundles for HIP">; def no_hip_rt: Flag<["-"], "no-hip-rt">, Group, HelpText<"Do not link against HIP runtime libraries">; -def rocm_path_EQ : Joined<["--"], "rocm-pat

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Joseph Huber via cfe-commits
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + // Check ROCm path if specified + const ToolChain &TC = getToolChain(); + TC.getDev

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-09 Thread Dominik Adamski via cfe-commits
@@ -201,3 +201,24 @@ ! RUN: -nogpulibc %s 2>&1 \ ! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s ! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu" + +! RUN: rm -rf %t/Inputs + +! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \ +! RUN: --off

[clang] [InstallAPI] Tie lifetime of FE objects to DylibVerifier (PR #88189)

2024-04-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/88189 >From a7894f987b80f1916195c3ab15da5c33ab69ab00 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 9 Apr 2024 13:04:18 -0700 Subject: [PATCH] [InstallAPI] Tie lifetime of FE objects to DylibVerifier A few

[clang] Fix coverage when /fo is used (PR #88201)

2024-04-09 Thread via cfe-commits
https://github.com/pdagobert created https://github.com/llvm/llvm-project/pull/88201 Fixes https://github.com/llvm/llvm-project/issues/87304 >From 6db0e01e198de9e5ee4055f9433150818c429c10 Mon Sep 17 00:00:00 2001 From: pdagobert Date: Tue, 9 Apr 2024 23:10:58 +0200 Subject: [PATCH] Fix coverag

[clang] Fix coverage when /fo is used (PR #88201)

2024-04-09 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fix coverage when /fo is used (PR #88201)

2024-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (pdagobert) Changes Fixes https://github.com/llvm/llvm-project/issues/87304 --- Full diff: https://github.com/llvm/llvm-project/pull/88201.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+4) ``

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-09 Thread via cfe-commits
mydeveloperday wrote: I wish we'd made this removal an option rather than just removing it, what we are seeing is reasonably formatted json or xml being streamed out is now poorly written ```c++ osjson << "{\n" <<" \"name\": \"value\",\n" <<" \"key\": \"abc\", \n" <<" }"

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

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

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-09 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/87824 >From 78f18445804fdb1cdf7810f56d3ae3c6e55f8da7 Mon Sep 17 00:00:00 2001 From: higher-performance <113926381+higher-performa...@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:36:05 -0400 Subject: [P

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-09 Thread via cfe-commits
higher-performance wrote: Added a release note as well; feel free to edit it if needed (or let me know if I should change anything)! https://github.com/llvm/llvm-project/pull/87824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-09 Thread via cfe-commits
pirama-arumuga-nainar wrote: Can you add a test similar to #70251? https://github.com/llvm/llvm-project/pull/87413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f04452d - [InstallAPI] Tie lifetime of FE objects to DylibVerifier (#88189)

2024-04-09 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-09T15:13:55-07:00 New Revision: f04452de1986e4e01296a80231efb212d6c84c42 URL: https://github.com/llvm/llvm-project/commit/f04452de1986e4e01296a80231efb212d6c84c42 DIFF: https://github.com/llvm/llvm-project/commit/f04452de1986e4e01296a80231efb212d6c84c42.diff

[clang] [InstallAPI] Tie lifetime of FE objects to DylibVerifier (PR #88189)

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

<    1   2   3   4   >