[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-08-21 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, If you have some time, could you please take a look at my response ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/ https://reviews.llvm.org/D143967

[PATCH] D158439: [Lex] Preambles should contain the global module fragment.

2023-08-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ChuanqiXu. Herald added subscribers: kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added projects: clang, clang-tools-extra. For

[PATCH] D141757: [clangd] allow extracting to variable for lambda expressions

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti updated this revision to Diff 552065. 5chmidti added a comment. Addressed comments: - added explicit template parameters, trailing return-type declarations and attributes to the visitor that finds DeclRefExprs - added a few more comments about why an extraction is expected to be unavai

[PATCH] D158343: WIP: [UpdateTestChecks] Add update test check support for freeze_bits metadata

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added subscribers: luismarques, jdoerfert, arichardson. Herald added a project: All. jmciver retitled this revision from "WIP: [UpdateTestChecks] Add update test check support for freeze_bits metadata Part of a sequence of exploratory patches using poison sem

[PATCH] D158345: WIP: [clang][llvm][test] Update tests to support freeze_bits metadata

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added subscribers: kerbowa, pengfei, jvesely. Herald added a project: All. jmciver retitled this revision from "[clang][llvm][test] Update tests to support freeze_bits metadata" to "WIP: [clang][llvm][test] Update tests to support freeze_bits metadata". jmciv

[PATCH] D141757: [clangd] allow extracting to variable for lambda expressions

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti marked 4 inline comments as done. 5chmidti added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:91 + +// Local variables declared inside of the selected lambda cannot go out of +// scope. The DeclRefExprs that are import

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D157879#4604046 , @aeubanks wrote: > is there any way to suppress this for a specific field? (I believe) I'm > seeing user code where a field is intentionally not being initialized Hmmm, so they're wanting to rely on th

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. @nikic I added this patch to a work in progress (WIP) "stack" of patches. D158352 and D158353 show what the intended progression looks like for mem2reg. I will add WIP SROA changes in the next few day

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D138499: [clangd] Extract Function: add hoisting support

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti added a comment. Ping. Because Phabricator is set to be made read-only on the 1. of October, it might be better to not review this patch here and instead open it on GitHub instead. Thoughts? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D158430: [flang][driver] Mark -fuse-ld as visible in Flang

2023-08-21 Thread Hao Jin via Phabricator via cfe-commits
erjin updated this revision to Diff 552068. erjin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158430/new/ https://reviews.llvm.org/D158430 Files: clang/include/clang/Driver/Options.td flang/test/Driver/misc-flags.f90

[PATCH] D158254: Fixing the memory leak using split() instead of strtok

2023-08-21 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan accepted this revision. abhina.sreeskantharajan added a comment. This revision is now accepted and ready to land. In D158254#4603765 , @hchilama wrote: > Hi @abhina.sreeskantharajan I have verified the fix aganist the clang-format,

[PATCH] D61670: [clang] [MinGW] Add the option -fno-autoimport

2023-08-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added subscribers: aeubanks, jyknight. rnk added a comment. This revision is now accepted and ready to land. lgtm cc +@aeubanks @jyknight to consider using the code model for this purpose Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions M

[PATCH] D158430: [flang][driver] Mark -fuse-ld as visible in Flang

2023-08-21 Thread Hao Jin via Phabricator via cfe-commits
erjin added a comment. In D158430#4603925 , @kiranchandramohan wrote: > Thanks. Thank you for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158430/new/ https://reviews.llvm.org/D158430 _

[clang] 634b2fd - [clang][ExtractAPI] Add support for C++ member templates

2023-08-21 Thread Erick Velez via cfe-commits
Author: Erick Velez Date: 2023-08-21T10:17:58-07:00 New Revision: 634b2fd2cac251e2d645dadc6b00a2b2b80a08d0 URL: https://github.com/llvm/llvm-project/commit/634b2fd2cac251e2d645dadc6b00a2b2b80a08d0 DIFF: https://github.com/llvm/llvm-project/commit/634b2fd2cac251e2d645dadc6b00a2b2b80a08d0.diff L

[PATCH] D158029: [clang][ExtractAPI] Add support for C++ member templates

2023-08-21 Thread Erick Velez via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG634b2fd2cac2: [clang][ExtractAPI] Add support for C++ member templates (authored by evelez7). Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions s

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti abandoned this revision. 5chmidti added a comment. Because there was no activity on this patch, I am closing it. I should've pinged a bit more :) With the move to GitHub pull requests soon, pushing this patch further in phabricator does not make sense to me. Instead, I could reopen thi

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Ashley Nelson via Phabricator via cfe-commits
ashleynh updated this revision to Diff 552071. ashleynh added a comment. Addressing comments Renamed flag, test file, and added to wasm-features.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158409/new/ https://reviews.llvm.org/D158409 Files:

[PATCH] D158233: [SEH] Fix wrong argument passes to the call of OutlinedFinally.

2023-08-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGCleanup.cpp:882 if (!Scope.hasBranchThroughs() && !HasFixups && !HasFallthrough && - Scope.getNumBranchAfters() == 1) { + !getLangOpts().EHAsynch && Scope.getNumBranchAfters() == 1) { ass

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. For me check is fine and bring some value. But for me auto-fixes in this check aren't needed, this simply complicate a check that could be very simple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128861/new/ https://rev

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-21 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4603537 , @balazske wrote: > My concern was related to nested namespaces or nested classes with friend > declarations that are equivalent and differ only in the nesting level. It may > be possible to construct code whe

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-08-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I share the raised concerns. And I think we are aligned. PS: sorry if any of my comments are dups, or outdated. I only had a little time last week, and things have progressed since then I noticed. I still decided to submit my possibly outdated and partial review commen

[clang] 3bb4855 - [clang][ExtractAPI] Refactor C++ method and field visitation

2023-08-21 Thread Erick Velez via cfe-commits
Author: Erick Velez Date: 2023-08-21T10:38:01-07:00 New Revision: 3bb485530869d3ea43458b24df5a2d5302553bf9 URL: https://github.com/llvm/llvm-project/commit/3bb485530869d3ea43458b24df5a2d5302553bf9 DIFF: https://github.com/llvm/llvm-project/commit/3bb485530869d3ea43458b24df5a2d5302553bf9.diff L

[PATCH] D158031: [clang][ExtractAPI] Refactor C++ method and field visitation

2023-08-21 Thread Erick Velez via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3bb485530869: [clang][ExtractAPI] Refactor C++ method and field visitation (authored by evelez7). Changed prior to commit: https://reviews.llvm.or

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. ah I thought this was in `-Wall` but it's not the struct is struct Foo { const void* buffer; uint32_t capacity; uint32_t reserved; }; where `reserved` isn't explicitly initialized. that seems like reasonable code, but I suppose we can just explicitly i

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. I'm pushing this, if you want to change anything else, just please open new review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157239/new/ https://reviews.llvm.org/D157239 _

[clang-tools-extra] a7bdaff - [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-21 Thread Piotr Zegar via cfe-commits
Author: Chris Cotter Date: 2023-08-21T17:38:30Z New Revision: a7bdaff7cad93e96ee9aaf3dc8b2a46c84717361 URL: https://github.com/llvm/llvm-project/commit/a7bdaff7cad93e96ee9aaf3dc8b2a46c84717361 DIFF: https://github.com/llvm/llvm-project/commit/a7bdaff7cad93e96ee9aaf3dc8b2a46c84717361.diff LOG:

[PATCH] D157239: [clang-tidy] Implement bugprone-incorrect-enable-if

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7bdaff7cad9: [clang-tidy] Implement bugprone-incorrect-enable-if (authored by ccotter, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D157239?vs=549777&id=552077#toc Reposit

[PATCH] D158031: [clang][ExtractAPI] Refactor C++ method and field visitation

2023-08-21 Thread Erick Velez via Phabricator via cfe-commits
evelez7 added a comment. In D158031#4603363 , @dang wrote: > Did this change not affect ordering of the symbols in the generated JSON? > Looks pretty good to me otherwise! It only changed method ordering due to them not being grouped together, so insta

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-08-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. One more thing to mention. Its usually illadvised to rename files or do changes that would seriously impact git blame, unless we have a really good reason doing so. Aesthetics usually don't count one, especially if the name is not user-facing. However, maintainability

[PATCH] D158433: [Clang] Do not change the type of captured vars when checking lambda constraints

2023-08-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:722 +const_cast(cast(FD))); +// Captures are not checked from within the lambda. +LSI->AfterParameterList = false; This comment does not really explain to me the effect of `

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 552078. MaskRay marked 3 inline comments as done. MaskRay added a comment. <4 x i32> => <3 x i32> (though no difference at runtime) remove a redundant `= 57` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13317 + continue; +Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)}; +Value *Features = Builder.CreateAlignedLoad( FreddyYe wrote: > Don't quite understand why w

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D157879#4604233 , @aeubanks wrote: > ah I thought this was in `-Wall` but it's not > > the struct is > > struct Foo { > const void* buffer; > uint32_t capacity; > uint32_t reserved; > }; > > where `reserve

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions MaskR

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-08-21 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. In D158156#4604242 , @steakhal wrote: > One more thing to mention. Its usually illadvised to rename files or do > changes that would seriously impact git blame, unless we have a really good > reason doing so. > Aesthetics usu

[clang-tools-extra] 4001ae1 - [clang-tidy] readability-container-size-empty - detect missing usage of .empty() on string_literals

2023-08-21 Thread Piotr Zegar via cfe-commits
Author: Felix Date: 2023-08-21T17:47:14Z New Revision: 4001ae175cbe351d496a6cd5481a554b346f706d URL: https://github.com/llvm/llvm-project/commit/4001ae175cbe351d496a6cd5481a554b346f706d DIFF: https://github.com/llvm/llvm-project/commit/4001ae175cbe351d496a6cd5481a554b346f706d.diff LOG: [clang-

[PATCH] D158346: [clang-tidy] readability-container-size-empty - detect missing usage of .empty() on string_literals

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4001ae175cbe: [clang-tidy] readability-container-size-empty - detect missing usage of .empty… (authored by felix642, committed by PiotrZSL). Changed prior to commit: https://reviews.llvm.org/D158346?vs=

[PATCH] D158233: [SEH] Fix wrong argument passes to the call of OutlinedFinally.

2023-08-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGCleanup.cpp:882 if (!Scope.hasBranchThroughs() && !HasFixups && !HasFallthrough && - Scope.getNumBranchAfters() == 1) { + !getLangOpts().EHAsynch && Scope.getNumBranchAfters() == 1) { ass

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti added a comment. In D128861#4604193 , @PiotrZSL wrote: > But for me auto-fixes in this check aren't needed, this simply complicate a > check that could be very simple. You might be right. I will fix the issues I have found and will propose this

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Note that there's an ongoing discussion on the GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96868 whether `-Wmissing-field-initializers` should apply to both C and C++ or just C. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SymmetricBinaryOperatorCheck.cpp:29 + +bool isPotentialSymmetricBinaryOperator(OverloadedOperatorKind Kind) { + return llvm::is_contained( again, I would probably try to

[PATCH] D157331: [clang] Implement C23

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: jrtc27. aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:113-115 +- Clang now adds which defines several macros for performing + checked integer arithmetic. The macro ``__STDC_VERSION_STDCKDINT_H__`` + is an integer

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-08-21 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Herald added a subscriber: ekilmer. Herald added a project: libunwind. Herald added a reviewer: libunwind. I think we should land this. Clang has grown workarounds in the meantime, e.g. https://github.com/llvm/llvm-project/blob/4001ae175cbe351d496a6cd5481a554b346f706d/cla

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-08-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. SGTM this was previously blocked on other changes, but those all landed so I can go ahead, rebase and land it today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140925/new/ https://reviews.llvm.org/D140925 __

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-21 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam marked 4 inline comments as done. saiislam added inline comments. Comment at: clang/lib/CodeGen/Targets/AMDGPU.cpp:383 +CGM.getTarget().getTargetOpts().CodeObjectVersion, /*Size=*/32, +llvm::GlobalValue::WeakODRLinkage); +} yaxunl

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-21 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam updated this revision to Diff 552085. saiislam marked an inline comment as done. saiislam added a comment. Adressed reviewer's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/new/ https://reviews.llvm.org/D139730 Files: c

[PATCH] D157129: [NFC] Fix unnecessary copy with auto.

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Herald added a subscriber: sunshaoce. In D157129#4571112 , @srividya-sundaram wrote: > Based on your comments, and after discussing with @tahonermann, I am > abandoning this patch. Btw, it helps reviewers if you explicitl

[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:140 +D0->getASTContext(), D1->getASTContext(), NonEquivalentDecls01, +StructuralEquivalenceKind::Default, false, false, false, +IgnoreTemplateParmDepth); --

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Ashley Nelson via Phabricator via cfe-commits
ashleynh updated this revision to Diff 552088. ashleynh added a comment. Squashed into one commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158409/new/ https://reviews.llvm.org/D158409 Files: clang/include/clang/Driver/Options.td clang/lib

[PATCH] D157129: [NFC] Fix unnecessary copy with auto.

2023-08-21 Thread Srividya Sundaram via Phabricator via cfe-commits
srividya-sundaram abandoned this revision. srividya-sundaram added a comment. I did spend a good amount of time trying to figure out how to abandon this review and gave up eventually. Even after your comment, I had to search a bit for the "Add Action.." drop down. Clearly, I'm UI challenged.

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-21 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; aaron.ballman wrote: > iana wrote: > > ldionne wrote: > > > iana wrote: > > > > aaron

[PATCH] D158430: [flang][driver] Mark -fuse-ld as visible in Flang

2023-08-21 Thread Hao Jin via Phabricator via cfe-commits
erjin updated this revision to Diff 552091. erjin added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158430/new/ https://reviews.llvm.org/D158430 Files: clang/include/clang/Driver/Options.td flang/test/Driver/misc-flags.f90

[PATCH] D128861: [clang-tidy] add cppcoreguidelines-symmetric-binary-operator

2023-08-21 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti added a comment. Thanks for your review comments :) . I'll incorporate them and reference your comments when I post the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128861/new/ https://reviews.llvm.org/D128861 ___

[PATCH] D153114: [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-08-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D153114#4603579 , @sammccall wrote: > Dep scanning - roles > > > IIUC we do this for two reasons: > > - to identify what module names we must have PCMs for in order to build a > given TU (either an open fil

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin accepted this revision. aheejin added a comment. This revision is now accepted and ready to land. LGTM % nit and the name resolution (multimemory vs. multi-memory) Comment at: clang/include/clang/Driver/Options.td:4583-4584 def mno_extended_const : Flag<["-"], "mno-ext

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Ashley Nelson via Phabricator via cfe-commits
ashleynh updated this revision to Diff 552096. ashleynh added a comment. removed - Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158409/new/ https://reviews.llvm.org/D158409 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/Targets/

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; iana wrote: > aaron.ballman wrote: > > iana wrote: > > > ldionne wrote: > >

[PATCH] D158372: [Clang] Treat invalid UDL as two tokens

2023-08-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/docs/ReleaseNotes.rst:97 ^ -- Implemented `CWG1473 `_ which allows spaces after ``operator""``. - Clang used to err on the lack of space when the literal suffix identifie

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: clang/include/clang/Driver/Options.td:4583-4584 def mno_extended_const : Flag<["-"], "mno-extended-const">, Group; +def mmulti_memories : Flag<["-"], "mmulti-memories">, Group; +def mno_multi_memories : Flag<["-"], "mno-multi-memories

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Ashley Nelson via Phabricator via cfe-commits
ashleynh updated this revision to Diff 552097. ashleynh added a comment. switching back to multiple memories for description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158409/new/ https://reviews.llvm.org/D158409 Files: clang/include/clang/Dr

[PATCH] D157708: [Sema] Suppress lookup diagnostics when checking reversed operators

2023-08-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The prior behavior of Clang is correct. A search of a class scope is ill-formed if it finds an ambiguous result, see http://eel.is/c++draft/basic.lookup#class.member.lookup-6.sentence-2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/include/clang/Driver/Options.td:4583-4584 def mno_extended_const : Flag<["-"], "mno-extended-const">, Group; +def mmulti_memories : Flag<["-"], "mmulti-memories">, Group; +def mno_multi_memories : Flag<["-"], "mno-multi-memories

[PATCH] D158363: [clang-format] Fix segmentation fault when formatting nested namespaces

2023-08-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please upload the patch with the full context. And add a test case. (From your issue.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158363/new/ https://reviews.llvm.org/D158363

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-21 Thread Ian McKellar via Phabricator via cfe-commits
ianloic added a comment. In D157879#4604233 , @aeubanks wrote: > ah I thought this was in `-Wall` but it's not > > the struct is > > struct Foo { > const void* buffer; > uint32_t capacity; > uint32_t reserved; > }; > > where `reserved` isn

[PATCH] D157572: [clang] Add `[[clang::library_extension]]` attribute

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > This allows standard libraries to mark symbols as extensions, so the compiler > can generate extension warnings when they are used. Huh, so this is basically the opposite of the `__extension__` macro (which is used to silence extension warnings)? I don't think w

[PATCH] D61670: [clang] [MinGW] Add the option -fno-autoimport

2023-08-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D61670#4604145 , @rnk wrote: > cc +@aeubanks @jyknight to consider using the code model for this purpose Hmm, I don't quite understand this comment; do you suggest that we after all should use the code model for controlling t

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-21 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; aaron.ballman wrote: > iana wrote: > > aaron.ballman wrote: > > > iana wrote: > > > >

[PATCH] D61670: [clang] [MinGW] Add the option -fno-autoimport

2023-08-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D61670#4604486 , @mstorsjo wrote: > In D61670#4604145 , @rnk wrote: > >> cc +@aeubanks @jyknight to consider using the code model for this purpose > > Hmm, I don't quite understand this comme

[PATCH] D158448: WIP

2023-08-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D158448 Files: clang/lib/CodeGen/Targets/

[PATCH] D157572: [clang] Add `[[clang::library_extension]]` attribute

2023-08-21 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D157572#4604482 , @aaron.ballman wrote: >> This allows standard libraries to mark symbols as extensions, so the >> compiler can generate extension warnings when they are used. > > Huh, so this is basically the opposite of the

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17067 + +Value *Iscov5 = CGF.Builder.CreateICmpSGE( +ABIVersion, Capitalization is weird, IsCOV5? Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17082-17083 +

[clang] 77596e6 - Revert D157750 "[Driver][CodeGen] Properly handle -fsplit-machine-functions for fatbinary compilation."

2023-08-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-08-21T13:54:15-07:00 New Revision: 77596e6b167bf0a5efa790597d6b75ac5e685b55 URL: https://github.com/llvm/llvm-project/commit/77596e6b167bf0a5efa790597d6b75ac5e685b55 DIFF: https://github.com/llvm/llvm-project/commit/77596e6b167bf0a5efa790597d6b75ac5e685b55.diff

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Ashley Nelson via Phabricator via cfe-commits
ashleynh added inline comments. Comment at: clang/include/clang/Driver/Options.td:4583-4584 def mno_extended_const : Flag<["-"], "mno-extended-const">, Group; +def mmulti_memories : Flag<["-"], "mmulti-memories">, Group; +def mno_multi_memories : Flag<["-"], "mno-multi-memorie

[clang] 86ed8cb - [WebAssembly] Add multiple memories feature

2023-08-21 Thread Thomas Lively via cfe-commits
Author: Ashley Nelson Date: 2023-08-21T14:23:14-07:00 New Revision: 86ed8cb8fabe7716b9046317231f861fee5f126a URL: https://github.com/llvm/llvm-project/commit/86ed8cb8fabe7716b9046317231f861fee5f126a DIFF: https://github.com/llvm/llvm-project/commit/86ed8cb8fabe7716b9046317231f861fee5f126a.diff

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Thomas Lively via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG86ed8cb8fabe: [WebAssembly] Add multiple memories feature (authored by ashleynh, committed by tlively). Changed prior to commit: https://reviews.l

[clang] 33af2f1 - [RISCV] Check type size for lax conversions between RVV builtin types and VectorType::RVVFixedLengthDataVector.

2023-08-21 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-08-21T14:28:57-07:00 New Revision: 33af2f131db71a18aefc5469129540e2097a537f URL: https://github.com/llvm/llvm-project/commit/33af2f131db71a18aefc5469129540e2097a537f DIFF: https://github.com/llvm/llvm-project/commit/33af2f131db71a18aefc5469129540e2097a537f.diff

[PATCH] D157130: [RISCV] Check type size for lax conversions between RVV builtin types and VectorType::RVVFixedLengthDataVector.

2023-08-21 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33af2f131db7: [RISCV] Check type size for lax conversions between RVV builtin types and… (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[clang] 3a67b91 - [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-08-21 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-08-21T14:50:04-07:00 New Revision: 3a67b912386e70073efcb2225c6354b85048b1ae URL: https://github.com/llvm/llvm-project/commit/3a67b912386e70073efcb2225c6354b85048b1ae DIFF: https://github.com/llvm/llvm-project/commit/3a67b912386e70073efcb2225c6354b85048b1ae.diff LO

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-08-21 Thread Ziqing Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ziqingluo-90 marked 4 inline comments as done. Closed by commit rG3a67b912386e: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter… (authored

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-08-21 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. Addressed comments and have landed this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156189/new/ https://reviews.llvm.org/D156189 ___ cfe-commits mailing list cfe-co

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: brad. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This ToolChain was added back in 2010 but has been unmaintained with no test. The constructe

[PATCH] D158378: [Driver] move Minix header search path management to the driver

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created https://reviews.llvm.org/D158461 to remove it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158378/new/ https://reviews.llvm.org/D158378 ___ cfe-commits mailing list cfe

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specify

[PATCH] D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-08-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D155387#4579866 , @ilya-biryukov wrote: > I believe this should compile as according to (over.match.oper)p4 > : > >> A non-template function or function template F na

[PATCH] D157632: [Profile] Allow online merging with debug info correlation.

2023-08-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingMerge.c:146 +if (!(__llvm_profile_get_version() & VARIANT_MASK_DBG_CORRELATE)) { + PROF_ERR("%s\n", "Missing profile data section."); + return 1; we're running into th

[PATCH] D158239: [clang][ExtractAPI] Add support for namespaces

2023-08-21 Thread Erick Velez via Phabricator via cfe-commits
evelez7 updated this revision to Diff 552155. evelez7 marked an inline comment as done. evelez7 added a comment. Move DetermineParentDecl to determineParentRecord in APIVisitor as a private method. Easier to just let it fetch the record for us and return nullptr if the parent is the translation

[PATCH] D157833: [C++20] [Coroutines] Mark await_suspend as noinline if the awaiter is not empty

2023-08-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Alright, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157833/new/ https://reviews.llvm.org/D157833 ___ cfe-commits mailing list

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-08-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D156565#4599812 , @aaron.ballman wrote: > Enable the diagnostic by default in C++ language modes, and under -Wall in > GNU++ language modes. I am happy with that approach. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D158233: [SEH] Fix wrong argument passes to the call of OutlinedFinally.

2023-08-21 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 552157. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158233/new/ https://reviews.llvm.org/D158233 Files: clang/lib/CodeGen/CGCleanup.cpp clang/test/CodeGen/exceptions-seh-finally.c clang/test/CodeGen/windows

[PATCH] D158233: [SEH] Fix wrong argument passes to the call of OutlinedFinally.

2023-08-21 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGCleanup.cpp:882 if (!Scope.hasBranchThroughs() && !HasFixups && !HasFallthrough && - Scope.getNumBranchAfters() == 1) { + !getLangOpts().EHAsynch && Scope.getNumBranchAfters() == 1) { as

[PATCH] D158233: [SEH] Fix wrong argument passes to the call of OutlinedFinally.

2023-08-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! Comment at: clang/lib/CodeGen/CGCleanup.cpp:881 + // to indicate abnormal termination) + const FunctionDecl *FD = dyn_cast_or_null(CurFuncDecl); if (

[PATCH] D158254: Fixing the memory leak using split() instead of strtok

2023-08-21 Thread Harini Chilamantula via Phabricator via cfe-commits
hchilama added a comment. Hi @abhina.sreeskantharajan can I please know the next process on how to land this revision to opensource? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158254/new/ https://reviews.llvm.org/D158254 __

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp

2023-08-21 Thread Brad Smith via Phabricator via cfe-commits
brad added a comment. Isn't there more than this to do a full proper removal? Looking around it looks like the Ananas and Contiki support can be removed. Ananas used to use Clang but switched back to GCC and the bits there are not maintained. The Contiki support never went anywhere. Repositor

[clang] b58e528 - [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers

2023-08-21 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-08-21T16:34:44-07:00 New Revision: b58e52889808e0e8da55ac77f651762f202aa4c5 URL: https://github.com/llvm/llvm-project/commit/b58e52889808e0e8da55ac77f651762f202aa4c5 DIFF: https://github.com/llvm/llvm-project/commit/b58e52889808e0e8da55ac77f651762f202aa4c5.diff LO

[PATCH] D156192: [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers

2023-08-21 Thread Ziqing Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ziqingluo-90 marked an inline comment as done. Closed by commit rGb58e52889808: [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable… (authored by ziq

[PATCH] D158371: [clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode

2023-08-21 Thread Ignat Loskutov via Phabricator via cfe-commits
loskutov updated this revision to Diff 552164. loskutov added a comment. git clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158371/new/ https://reviews.llvm.org/D158371 Files: clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-21 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 552167. hazohelet marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155610/new/ https://reviews.llvm.org/D155610 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaDeclCXX.cpp clang/test/Lexer/cxx1z-trigraphs.

<    1   2   3   >