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

2024-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. LGTM from my side. I'll leave the conformance test details to the folks who know what they're doing. https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Seems like there is a stray call to `TemplateTemplateParmDecl::Create` in LLDB... #88139 will address it https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,126 @@ + ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s + +; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64 +; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32 +; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16 +; CHECK-DAG: %[[#vec2_float_16:]] = OpTypeVector

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

2024-04-11 Thread Alexandre Ganea via cfe-commits
aganea wrote: > In the meantime, are you able to work around this for your non-modular > use-case by applying your change when building your own compiler downstream? Yes I fixed it in our downstream. I am more worried about other users, since the initial version that @hyp committed a while ago

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-11 Thread Kalesh Singh via cfe-commits
https://github.com/Kalesh-Singh updated https://github.com/llvm/llvm-project/pull/87413 >From ae55bb33871fc840c93ad59aed6016fc3999 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 2 Apr 2024 11:26:11 -0700 Subject: [PATCH] ANDROID: x86_64: Set default max-page-size to 16kB Android no

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

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kalesh Singh (Kalesh-Singh) Changes Android now supports both 4kB and 16kB page sizes. The vast majority of android apps are developed on x86_64 machines. In order to provide emulators that support larger page sizes, Android emulat

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

2024-04-11 Thread Kalesh Singh via cfe-commits
https://github.com/Kalesh-Singh updated https://github.com/llvm/llvm-project/pull/87413 >From ae55bb33871fc840c93ad59aed6016fc3999 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 2 Apr 2024 11:26:11 -0700 Subject: [PATCH] ANDROID: x86_64: Set default max-page-size to 16kB Android no

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

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -230,6 +251,26 @@ class DependencyScanningFilesystemLocalCache { assert(InsertedEntry == &Entry && "entry already present"); return *InsertedEntry; } + + /// Returns real path associated with the filename or nullptr if none is + /// found. + const CachedRealPath

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

2024-04-11 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] b2ea38f - [clang][Interp] Fix handling integral function pointers

2024-04-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-11T20:15:55+02:00 New Revision: b2ea38f9fc2381e7c04e610f6f8ed6786c2da38e URL: https://github.com/llvm/llvm-project/commit/b2ea38f9fc2381e7c04e610f6f8ed6786c2da38e DIFF: https://github.com/llvm/llvm-project/commit/b2ea38f9fc2381e7c04e610f6f8ed6786c2da38e.diff LO

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

2024-04-11 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-11 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM. Thanks. https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-11 Thread Bill Wendling via cfe-commits
bwendling wrote: > Hi, I've made some changes and am looking for some more review on this PR: > > * This attribute no longer supports C++ as there are other solutions for that > language [1](https://godbolt.org/z/7qPve6cWq) that allow for the same > fine-grained wrapping control without changi

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

2024-04-11 Thread Kalesh Singh via cfe-commits
https://github.com/Kalesh-Singh updated https://github.com/llvm/llvm-project/pull/87413 >From ae55bb33871fc840c93ad59aed6016fc3999 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 2 Apr 2024 11:26:11 -0700 Subject: [PATCH 1/2] ANDROID: x86_64: Set default max-page-size to 16kB Androi

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

2024-04-11 Thread Kalesh Singh via cfe-commits
Kalesh-Singh wrote: > Can you add a test similar to #70251? Added tests for x86[_64], thanks 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-co

[clang] [flang] [Flang] Add options frtlib-add-rpath and resource-dir (PR #88280)

2024-04-11 Thread via cfe-commits
https://github.com/dpalermo approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix AST dump for {CXXDefaultArgExpr, CXXDefaultInitExpr} (PR #88269)

2024-04-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but you should check JSONNodeDumper.cpp as well to see if it needs similar changes. https://github.com/llvm/llvm-project/pull/88269 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] [AMDGPU] Add Clang builtins for amdgcn s_ttrace intrinsics (PR #88076)

2024-04-11 Thread Stanislav Mekhanoshin via cfe-commits
@@ -61,6 +61,8 @@ BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n") BUILTIN(__builtin_amdgcn_s_sendmsg, "vIiUi", "n") BUILTIN(__builtin_amdgcn_s_sendmsghalt, "vIiUi", "n") BUILTIN(__builtin_amdgcn_s_barrier, "v", "n") +BUILTIN(__builtin_amdgcn_s_ttracedata, "vi", "n") +BUILTIN(__

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 Thread via cfe-commits
https://github.com/jkorous-apple approved this pull request. LGTM Thank you for fixing this! https://github.com/llvm/llvm-project/pull/88406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2024-04-11 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > I think this might be breaking: > FAIL: LLVM :: tools/gold/X86/thinlto.ll Thanks for reporting and sorry for this. I'll send out a fix soon. https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing list cfe-commits@

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

2024-04-11 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: yeah that patch makes those test pass with this PR, lgtm (you could also test locally by touching the files I mentioned above, e.g. even just `touch lib/clang/19/lib/linux/libclang_rt.builtins-aarch64-android.a` repro'd the test failure on my machine) https://github.com/llvm/l

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

2024-04-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed 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] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Forbidding usage in C++ probably avoids the worst of the canonical-type issues, but there's still some potential for weird results. Particularly with type merging; for example, if you write `a ? (wrap_int)x : 1`, is the result a wrapping type? https://github.com/llvm/llv

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-11 Thread Jinsong Ji via cfe-commits
jsji wrote: https://godbolt.org/z/WTTKfG1ha Looks like this is causing some assert failures. @Sirraide Thanks @jyu2-git for helping identifying the commit. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [AMDGPU] Add Clang builtins for amdgcn s_ttrace intrinsics (PR #88076)

2024-04-11 Thread Corbin Robeck via cfe-commits
https://github.com/CRobeck updated https://github.com/llvm/llvm-project/pull/88076 >From 1e2cab61cbf46e5cc73d7ee6523dcce1a75c7549 Mon Sep 17 00:00:00 2001 From: Corbin Robeck Date: Mon, 8 Apr 2024 19:58:57 -0500 Subject: [PATCH 1/4] add clang builtins for amdgcn s_ttrace intrinsics --- clang/

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

2024-04-11 Thread Bill Wendling via cfe-commits
bwendling wrote: > Forbidding usage in C++ probably avoids the worst of the canonical-type > issues, but there's still some potential for weird results. Particularly with > type merging; for example, if you write `a ? (wrap_int)x : 1`, is the result > a wrapping type? I had a similar question

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-11 Thread via cfe-commits
Sirraide wrote: > https://godbolt.org/z/WTTKfG1ha Looks like this is causing some assert > failures. @Sirraide Thanks @jyu2-git for helping identifying the commit. I think I might know what’s going on here: We probably have an `AttributedType` or some other form of sugar here; I’ll see if I ca

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/88236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/88236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Haojian Wu via cfe-commits
@@ -89,7 +89,9 @@ const CodeCompleteOptions::CodeCompletionRankingModel namespace { -CompletionItemKind toCompletionItemKind(index::SymbolKind Kind) { +CompletionItemKind +toCompletionItemKind(index::SymbolKind Kind, + const llvm::StringRef *Signature = nu

[clang] 5d6d8dc - [clang][llvm] Remove "implicit-section-name" attribute (#87906)

2024-04-11 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-04-11T12:29:29-07:00 New Revision: 5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7 URL: https://github.com/llvm/llvm-project/commit/5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7 DIFF: https://github.com/llvm/llvm-project/commit/5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7.diff

[clang] [llvm] [clang][llvm] Remove "implicit-section-name" attribute (PR #87906)

2024-04-11 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/87906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea created https://github.com/llvm/llvm-project/pull/88427 `FileManager::getDirectoryRef` and `FileManager::getFileRef` are hot code paths in `clang-scan-deps`. In these functions, we update a couple of atomic variables related to printing statistics, which causes conten

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandre Ganea (aganea) Changes `FileManager::getDirectoryRef` and `FileManager::getFileRef` are hot code paths in `clang-scan-deps`. In these functions, we update a couple of atomic variables related to printing statistics, which causes

[clang] [llvm] [AMDGPU] Add Clang builtins for amdgcn s_ttrace intrinsics (PR #88076)

2024-04-11 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. https://github.com/llvm/llvm-project/pull/88076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework the printing of attributes (PR #87281)

2024-04-11 Thread Kim Gräsman via cfe-commits
kimgr wrote: A note from left field: I think this PR broke the IWYU test suite. We use `TemplateDecl::print` + some postprocessing to generate template forward-declarations. We're seeing this diff now: ```diff -template class FinalTemplate; +template class FinalTemplate; ``` So a spurious ex

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

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

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

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

[clang] Rework the printing of attributes (PR #87281)

2024-04-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > A note from left field: I think this PR broke the IWYU test suite. We use > `TemplateDecl::print` + some postprocessing to generate template > forward-declarations. We're seeing this diff now: > > ```diff > -template class FinalTemplate; > +template class FinalTemplate;

[clang] Add txtpb to the list of supported TextProto extensions (PR #88355)

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

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-11 Thread via cfe-commits
Sirraide wrote: Looks like that was the problem; I’ll open a pr to fix this. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework the printing of attributes (PR #87281)

2024-04-11 Thread Kim Gräsman via cfe-commits
kimgr wrote: @erichkeane Thanks! Let me just see if I can bisect it to this commit; I don't have any evidence yet, this PR was just the only significant change to `DeclPrinter.cpp` in the past few days. I need a little while to rebuild my local Clang tree with and without the patch. https://g

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/88428 This fixes a bug introduced by #84473: if a lambda’s type is type sugar (e.g. an `AttributedType`), we need to use `getAs()` instead of `cast()` to retrieve the `FunctionProtoType`. >From a66cded51aa55a998bc12

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/88411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: General question. Should there be some support in clang/tools/libclang/CIndex.cpp? https://github.com/llvm/llvm-project/pull/88411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeEnum(DC->getDefaultClauseKind()); return; } + case OpenACCClauseKind::If: { +const auto *IC = cast(C); +writeSourceLocation(IC->getLParenLoc()); +AddStmt(const

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -81,6 +100,51 @@ class OpenACCDefaultClause : public OpenACCClauseWithParams { SourceLocation EndLoc); }; +/// Represents one of the handful of classes that has an optional/required +/// 'condition' expression as an argument. +class Op

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -11099,6 +11099,19 @@ OpenACCClause *TreeTransform::TransformOpenACCClause( ParsedClause.setDefaultDetails( cast(OldClause)->getDefaultClauseKind()); break; + case OpenACCClauseKind::If: { +Expr *Cond = const_cast( alexey-bataev wrote:

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -27,10 +28,48 @@ OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext &C, return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc); } +OpenACCIfClause *OpenACCIfClause::Create(const ASTContext &C, + Sour

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeEnum(DC->getDefaultClauseKind()); return; } + case OpenACCClauseKind::If: { +const auto *IC = cast(C); +writeSourceLocation(IC->getLParenLoc()); +AddStmt(const

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -55,12 +55,49 @@ bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind, default: return false; } + case OpenACCClauseKind::If: +switch (DirectiveKind) { +case OpenACCDirectiveKind::Parallel: +case OpenACCDirectiveKind::Serial: +ca

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This fixes a bug introduced by #84473: if a lambda’s type is type sugar (e.g. an `AttributedType`), we need to use `getAs()` instead of `cast()` to retrieve the `FunctionProtoType`. --- Full diff: https://github.c

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-11 Thread via cfe-commits
Sirraide wrote: #88428 https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Ooof, yeah, good catch. I should have caught that in the review, I've fallen for that one before :) https://github.com/llvm/llvm-project/pull/88428 ___ cfe-commits mailing list cfe-commits@lis

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

2024-04-11 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > I think this might be breaking: FAIL: LLVM :: tools/gold/X86/thinlto.ll fixed in https://github.com/llvm/llvm-project/commit/20ed5b1f45871612570d3bd447121ac43e083c6a https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
Sirraide wrote: > Ooof, yeah, good catch. I should have caught that in the review, I've fallen > for that one before :) I was just now made aware of the fact that this asserts and the only reason I found the problem fairly quickly is because I happen to have a pr open at the moment that deals

[clang] [InstallAPI] Handle zippered frameworks (PR #88205)

2024-04-11 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. https://github.com/llvm/llvm-project/pull/88205 ___ 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-11 Thread Jan Svoboda via cfe-commits
@@ -226,9 +247,28 @@ class DependencyScanningFilesystemLocalCache { insertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry) { assert(llvm::sys::path::is_absolute_gnu(Filename)); -const auto *InsertedEntry = Cache.insert(

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
@@ -27,10 +28,48 @@ OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext &C, return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc); } +OpenACCIfClause *OpenACCIfClause::Create(const ASTContext &C, + Sour

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeEnum(DC->getDefaultClauseKind()); return; } + case OpenACCClauseKind::If: { +const auto *IC = cast(C); +writeSourceLocation(IC->getLParenLoc()); +AddStmt(const

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/88411 >From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 10 Apr 2024 07:56:30 -0700 Subject: [PATCH 1/3] [OpenACC] Implement 'if' clause for Compute Constructs Like

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

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -130,11 +130,11 @@ DependencyScanningFilesystemSharedCache::CacheShard:: getOrEmplaceEntryForFilename(StringRef Filename, llvm::ErrorOr Stat) { std::lock_guard LockGuard(CacheLock); - auto Insertion = EntriesByFilename.insert({Filename

[clang] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-11 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/88432 None >From 43b007bfb184c6fdb5d802afca16af14e555b628 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 9 Jul 2020 15:10:49 -0700 Subject: [PATCH] allow use of ptrauth module from no_undeclared_inclu

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Alexey Bataev via cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeEnum(DC->getDefaultClauseKind()); return; } + case OpenACCClauseKind::If: { +const auto *IC = cast(C); +writeSourceLocation(IC->getLParenLoc()); +AddStmt(const

[clang] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ian Anderson (ian-twilightcoder) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/88432.diff 5 Files Affected: - (modified) clang/lib/Basic/Module.cpp (+4) - (added) clang/test/Modules/Inputs/ptrauth-include-from-darw

[clang] Add txtpb to the list of supported TextProto extensions (PR #88355)

2024-04-11 Thread Jing Wang via cfe-commits
jingw wrote: Thank you! Are you able to merge this? I don't think I have access. https://github.com/llvm/llvm-project/pull/88355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeEnum(DC->getDefaultClauseKind()); return; } + case OpenACCClauseKind::If: { +const auto *IC = cast(C); +writeSourceLocation(IC->getLParenLoc()); +AddStmt(const

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-04-11 Thread Jinsong Ji via cfe-commits
jsji wrote: Thank you @Sirraide for the quick fix. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (#87541)" (PR #88311)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aa80f3e - Reapply "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (#87541)" (#88311)

2024-04-11 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-11T16:19:29-04:00 New Revision: aa80f3ec48419a73aafcc2ff947c6dd1e3734481 URL: https://github.com/llvm/llvm-project/commit/aa80f3ec48419a73aafcc2ff947c6dd1e3734481 DIFF: https://github.com/llvm/llvm-project/commit/aa80f3ec48419a73aafcc2ff947c6dd1e3734481

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-11 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel created https://github.com/llvm/llvm-project/pull/88438 1. Add `-fdebug-info-for-profiling -funique-internal-linkage-names`, which improve the usefulness of debug info for profiling. 2. Recommend the use of `br_inst_retired.near_taken:uppp`, which provides the

[clang] 44de2bb - [CIR][cmake] Add support for cmake variable CLANG_ENABLE_CIR

2024-04-11 Thread via cfe-commits
Author: Nathan Lanza Date: 2024-04-11T16:56:31-04:00 New Revision: 44de2bb6949f0ca62a2e16506fe3d91be14e6d23 URL: https://github.com/llvm/llvm-project/commit/44de2bb6949f0ca62a2e16506fe3d91be14e6d23 DIFF: https://github.com/llvm/llvm-project/commit/44de2bb6949f0ca62a2e16506fe3d91be14e6d23.diff

[clang] [llvm] [CIR][cmake] Add support for cmake variable CLANG_ENABLE_CIR (PR #86078)

2024-04-11 Thread Nathan Lanza via cfe-commits
https://github.com/lanza edited https://github.com/llvm/llvm-project/pull/86078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CIR][cmake] Add support for cmake variable CLANG_ENABLE_CIR (PR #86078)

2024-04-11 Thread Nathan Lanza via cfe-commits
https://github.com/lanza closed https://github.com/llvm/llvm-project/pull/86078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-11 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel ready_for_review https://github.com/llvm/llvm-project/pull/88438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tim Creech (tcreech-intel) Changes 1. Add `-fdebug-info-for-profiling -funique-internal-linkage-names`, which improve the usefulness of debug info for profiling. 2. Recommend the use of `br_inst_retired.near_taken:uppp`, which provides th

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

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

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-11 Thread Tim Creech via cfe-commits
tcreech-intel wrote: @williamweixiao, @HaohaiWen, this updates the docs to describe best practices given #83972. It seems `-fdebug-info-for-profiling` can be particularly important. Without it we were discarding nearly half of the samples in some cases. https://github.com/llvm/llvm-project/pu

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

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

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

2024-04-11 Thread via cfe-commits
https://github.com/pirama-arumuga-nainar approved this pull request. 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] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,210 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionEffectSet; + +/// Represents a

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

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -3637,6 +3637,15 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto &EllipsisLoc = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (epi.FunctionEffects) { +auto &ExtraBits = *getTrailingObjects(); +ExtraBits.HasF

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

2024-04-11 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 01/14] [clang] Move lookup filename into function --- .../Depe

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

2024-04-11 Thread via cfe-commits
@@ -4429,6 +4433,210 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionEffectSet; + +/// Represents a

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

2024-04-11 Thread via cfe-commits
@@ -3637,6 +3637,15 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto &EllipsisLoc = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (epi.FunctionEffects) { +auto &ExtraBits = *getTrailingObjects(); +ExtraBits.HasF

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

2024-04-11 Thread via cfe-commits
@@ -3637,6 +3637,15 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto &EllipsisLoc = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (epi.FunctionEffects) { +auto &ExtraBits = *getTrailingObjects(); +ExtraBits.HasF

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/87848 >From ee56548604be9473f33cd809c901886f37a3d8e9 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 5 Apr 2024 15:12:39 -0700 Subject: [PATCH 1/5] [clang][modules] Do not resolve `HeaderFileInfo` externall

[clang] 84df7a0 - [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (#87848)

2024-04-11 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-04-11T14:44:55-07:00 New Revision: 84df7a09f8da5809b85fd097015e5ac6cc8a3f88 URL: https://github.com/llvm/llvm-project/commit/84df7a09f8da5809b85fd097015e5ac6cc8a3f88 DIFF: https://github.com/llvm/llvm-project/commit/84df7a09f8da5809b85fd097015e5ac6cc8a3f88.diff L

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

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

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-11 Thread Michael Buch via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s Michael137 wrote: Do we now lose a tiny bit of coverage for `-glldb`? I assume this change is to make sure th

[clang-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

2024-04-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88446 The `FileEntry` corresponds to a `FileID` containing the `SourceLocation` of a `NamedDecl` which (I think) might've been deserialized from a PCM file. Considering external `HeaderFileInfo` here is most like

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -409,7 +409,7 @@ class SymbolCollector::HeaderFileURICache { // Framework headers are spelled as , not // "path/FrameworkName.framework/Headers/Foo.h". auto &HS = PP->getHeaderSearchInfo(); -if (const auto *HFI = HS.getExistingFileInfo(*FE, /*WantExternal*/ f

[clang-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Jan Svoboda (jansvoboda11) Changes The `FileEntry` corresponds to a `FileID` containing the `SourceLocation` of a `NamedDecl` which (I think) might've been deserialized from a PCM file. Considering external `HeaderFileInfo` he

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

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,190 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent dougsonos wrote: Split the file. https://github.com/llvm/llvm-project/pull/

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

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -1868,6 +1868,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, FromFn = QT->getAs(); Changed = true; } + +if (getLangOpts().CPlusPlus) { + // For C, when called from checkPointerTypesForAssignment, + // we need not to c

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

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -18324,6 +18324,47 @@ bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, return true; } + // Virtual overrides: check for matching effects. + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + + if

<    1   2   3   4   >