[PATCH] D110436: [WIP] Add %n format specifier warning

2021-09-24 Thread Jayson Yan via Phabricator via cfe-commits
Jaysonyan created this revision. Jaysonyan added reviewers: leonardchan, phosek. Jaysonyan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This warning is to dissuade developers from using the potentially unsafe %n format specifier. Current

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I like this. Consider only displaying the major version (e.g., `clang-format 14` instead of `clang-format 14.0.0`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110432/new/ https://reviews.llvm.org/D110432 _

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I agree this looks better F19213646: image.png Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110432/new/ https://reviews.llvm.org/D110432 ___

[PATCH] D110257: [CFE][Codegen] Do not break the contiguity of static allocas.

2021-09-24 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. Nice work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110257/new/ https://reviews.llvm.org/D110257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D110436: [WIP] Add %n format specifier warning

2021-09-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. The patch description says what the change is, but not why it is the way it is. In particular, it might be helpful to be more verbose than just stating that something is unsafe. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-09-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 374921. mizvekov added a comment. update print-type.cpp test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110216/new/ https://reviews.llvm.org/D110216 Files: clang-tools-extra/clang-tidy/cppcoreguidelines

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D110422#3021283 , @jsji wrote: >> In other binary formats the first weak definition is selected and other weak >> definitions are discarded. >> Do you mean that AIX ld doesn't pick the first weak definition? > > No. I think th

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. Pos_Rel __profc_weak_func notation is just the normal relocation to symbol __profc_weak_func. The relocation here is to calculate the relative pointer (offset) to __profc__weak_func from __profd__weak__func. In example above, the offsets value after binding will be the sa

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-09-24 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I am. I'll jump on this over the weekend. Sorry been a bit buried in my day job Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The description is still unclear. Say a.o has a weak `foo, __profc_foo, __profd_foo`, b.o has a weak `foo, __profc_foo, __profd_foo`. The linker picks the definitions from `a.o`. In the PGO implementation, it doesn't whether the non-discarded b.o `__profd_foo` has garba

[PATCH] D36850: [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation

2021-09-24 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 374934. modimo marked an inline comment as done. modimo added a comment. Complete explanation in thinlto-funcattr-prop.ll, also fix up diff to contain all changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D3

[PATCH] D36850: [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation

2021-09-24 Thread Di Mo via Phabricator via cfe-commits
modimo added inline comments. Comment at: clang/test/CodeGen/thinlto-funcattr-prop.ll:17 -; CHECK: ^2 = gv: (guid: 13959900437860518209, summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 1, dsoLocal: 1, canAutoHid

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. In D110422#3021535 , @MaskRay wrote: > The description is still unclear. > > Say a.o has a weak `foo, __profc_foo, __profd_foo`, b.o has a weak `foo, > __profc_foo, __profd_foo`. > The linker picks the definitions from `a.o`. In the

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D110422#3021572 , @jsji wrote: > In D110422#3021535 , @MaskRay wrote: > >> The description is still unclear. >> >> Say a.o has a weak `foo, __profc_foo, __profd_foo`, b.o has a weak `fo

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-09-24 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. @vsapsai just checking on where we are with this one. Is the current plan to investigate an approach only serializing the methods declared in each module, or are we good to go ahead with the set de-duplication approach? I tried profiling with D110123

[PATCH] D110392: [clang-format] Left/Right alignment fixer can cause false positive replacements when they don't actually change anything

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/QualifierAlignmentFixer.cpp:95 + if (Err) +llvm::errs() << "Error removing no op replacements : " + << llvm::toString(std::move(Err)) << "\n"; The message may

[PATCH] D110089: [CUDA] Implement experimental support for texture lookups.

2021-09-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. Okay, I give up on the phab interface. It's unreadable with all the existing comments and lint errors. Hope you don't mind comments this way. I'm just going to put it all in a giant code block so it doesn't get wrapped or whatever. +// _

[PATCH] D109693: Driver: Remove major release version detection for RHEL

2021-09-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. LGTM, please reformat the code though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109693/new/ https://reviews.llvm.org/

[PATCH] D110089: [CUDA] Implement experimental support for texture lookups.

2021-09-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Presumably as a separate commit we should add tests to the test_suite repository to ensure that this at least still compiles with different versions of CUDA? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110089/new/ https:

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D110432#3021391 , @MyDeveloperDay wrote: > I agree this looks better > > F19213646: image.png Full support for that. And for the whole change. Comment at: cl

[PATCH] D109557: Adds a BreakBeforeClosingParen option

2021-09-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. In D109557#3021312 , @MyDeveloperDay wrote: > FYI, this is a very aggressive change, I highly recommend you run this

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. We have verified all the profile counters in SPEC , all are OK. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110422/new/ https://reviews.llvm.org/D110422 ___ cfe-commits mailing li

[PATCH] D110422: [AIX] Enable PGO without LTO

2021-09-24 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. Using to `PrivateLinkage`, all the profc/profd for each weak symbol will be *local* to objects, and all kept in the csect, so we won't have problem. The downside is that we won't be able to discard the duplicated counters and profile data, but those can not be discarded ev

[PATCH] D110445: [NFC] Avoid some AttrBuilder redundant initialization

2021-09-24 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. Wouldn't this go against https://llvm.org/docs/CodingStandards.html#do-not-use-static-constructors? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110445/new/ https://reviews.llvm.org/D110445

[PATCH] D108560: [clang-tidy] Add support for NOLINTBEGIN ... NOLINTEND comments to suppress clang-tidy warnings over multiple lines

2021-09-24 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz updated this revision to Diff 374969. salman-javed-nz added a comment. Pre-merge build error doesn't seem related to my change, but rebasing patch anyway just to be sure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108560/new/ ht

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks our packaging builders too: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8835201798501639249/+/u/package_clang/stdout?format=raw Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ ht

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Note that stage 2 fails, where we're supposed to use lld. So I think this is probably some compiler-rt test config problem you need to sort out, and not a fundamental problem with the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[clang] 6ece82e - Revert "[Driver] Correctly handle static C++ standard library"

2021-09-24 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2021-09-24T18:44:53-04:00 New Revision: 6ece82e9006d16b7fba7660ce09b2c62ab8460fa URL: https://github.com/llvm/llvm-project/commit/6ece82e9006d16b7fba7660ce09b2c62ab8460fa DIFF: https://github.com/llvm/llvm-project/commit/6ece82e9006d16b7fba7660ce09b2c62ab8460fa.diff LO

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Re-reverted for now in 6ece82e9006d16b7fba7660ce09b2c62ab8460fa . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D1101

[PATCH] D110452: [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

2021-09-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, rsmith, arphaman. Herald added a subscriber: ributzka. vsapsai requested review of this revision. Herald added a project: clang. With the old approach we were updating `ObjCInterfaceType.Decl` to the last encountered definition. But du

[PATCH] D110089: [CUDA] Implement experimental support for texture lookups.

2021-09-24 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 374979. tra added a comment. More comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110089/new/ https://reviews.llvm.org/D110089 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_cuda_run

[PATCH] D110453: [modules] Update visibility for merged ObjCInterfaceDecl definitions.

2021-09-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, bnbarham. Herald added a subscriber: ributzka. vsapsai requested review of this revision. Herald added a project: clang. We keep using the first encountered definition and need to take into account visibility from subsequent definition

[PATCH] D110452: [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

2021-09-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. This is a clean-up before https://reviews.llvm.org/D110453 Comment at: clang/lib/AST/DeclObjC.cpp:608 - // Make the type point at the definition, now that we have one. - if (TypeForDecl) -cast(TypeForDecl)->Decl = this; Tracking a

[PATCH] D110089: [CUDA] Implement experimental support for texture lookups.

2021-09-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D110089#3021652 , @jlebar wrote: > Okay, I give up on the phab interface. It's unreadable with all the existing > comments and lint errors. Yeah. Phabricator experience is not great. > +// Put all functions into anonymous namesp

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 374984. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.org/D109625 Files: compiler-rt/cmake/Modules/AddCompilerRT.cmake compiler-rt/test/CMakeLists.txt Index: compiler-r

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Updated to exclude readelf. We also don't need any of the other tools added in the `NOT COMPILER_RT_STANDALONE_BUILD` case, so I just added them to `LIT_ONLY_TOOLS` in the `COMPILER_RT_STANDALONE_BUILD` case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D110455: DebugInfo: Use clang's preferred names for integer types

2021-09-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added reviewers: probinson, aprantl. dblaikie requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts c7f16ab3e3f27d944db72908c9c1b1b7366f5515 / r109694 - which suggested this was done to improv

[PATCH] D109652: [PowerPC] Restrict various P10 options to P10 only.

2021-09-24 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 374990. amyk edited the summary of this revision. amyk added a comment. Addressed Lei's review comments to output: error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed' when PC-Rel is specified pre-P10. Also updated the comment for MMA

[PATCH] D110458: [clang] Put original flags on 'Driver args:' crash report line

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. thakis requested review of this revision. We used to put the canonical spelling of flags after alias processing on that line. For clang-cl in particular, that meant that we put flags on that line that the clang-cl driver doesn't even acc

[PATCH] D110463: [CMake] Pass through CMAKE_READELF to subbuilds

2021-09-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: leonardchan. Herald added a subscriber: mgorny. phosek requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits. This matches handling of other CMake var

[clang] d893692 - [CMake] Pass through CMAKE_READELF to subbuilds

2021-09-24 Thread Petr Hosek via cfe-commits
Author: Petr Hosek Date: 2021-09-24T18:20:30-07:00 New Revision: d893692024b8f05c63329f9a4e5f2432380be27c URL: https://github.com/llvm/llvm-project/commit/d893692024b8f05c63329f9a4e5f2432380be27c DIFF: https://github.com/llvm/llvm-project/commit/d893692024b8f05c63329f9a4e5f2432380be27c.diff LO

[PATCH] D110463: [CMake] Pass through CMAKE_READELF to subbuilds

2021-09-24 Thread Petr Hosek 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 rGd893692024b8: [CMake] Pass through CMAKE_READELF to subbuilds (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D110128#3021876 , @thakis wrote: > Note that stage 2 fails, where we're supposed to use lld. So I think this is > probably some compiler-rt test config problem you need to sort out, and not a > fundamental problem with the pat

[PATCH] D110460: [clang] set templates as invalid when any of the parameters are invalid

2021-09-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. See PR51872 for the original repro. This fixes a crash when converting a templated constructor into a deduction guide, in case any of the template pa

[PATCH] D110460: [clang] set templates as invalid when any of the parameters are invalid

2021-09-24 Thread Matheus Izvekov 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 rG37adc4f957c2: [clang] set templates as invalid when any of the parameters are invalid (authored by mizvekov). Repository: rG LLVM Github Monorepo

[clang] 37adc4f - [clang] set templates as invalid when any of the parameters are invalid

2021-09-24 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2021-09-25T04:04:47+02:00 New Revision: 37adc4f957c2383a625e2e593ba1d18a25d92b91 URL: https://github.com/llvm/llvm-project/commit/37adc4f957c2383a625e2e593ba1d18a25d92b91 DIFF: https://github.com/llvm/llvm-project/commit/37adc4f957c2383a625e2e593ba1d18a25d92b91.dif

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-09-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D109632#3013620 , @dexonsmith wrote: > In D109632#3013523 , @vsapsai wrote: > >> 2. Serialize only methods owned by the current module (and change >> `ReadMethodPoolVisitor` appropria

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-09-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D109632#3021644 , @rmaz wrote: > @vsapsai just checking on where we are with this one. Is the current plan to > investigate an approach only serializing the methods declared in each module, > or are we good to go ahead with t

<    1   2