[PATCH] D121141: [Clang] Add `-fexperimental-library` flag to enable unstable and experimental features: follow-up fixes

2022-07-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1186 -defm unstable : BoolFOption<"unstable", - LangOpts<"Unstable">, DefaultFalse, - PosFlag, +defm experimental_library : BoolFOption<"experimental-library", + LangOpts<"ExperimentalLibrary">,

[PATCH] D129855: [clang][PowerPC] Set lld as clang's default linker for PowerPC Linux

2022-07-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This is not right as using `ld.lld` as the default linker isn't the majority case. If you want to change the default for your distribution, set `-DCLANG_DEFAULT_LINKER=lld` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129

[PATCH] D129921: [clang-format] Never remove braces in macro definitions

2022-07-16 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Nice finding! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129921/new/ https://reviews.llvm.org/D129921 _

[PATCH] D129926: [clang-format] Handle constructor invocations after new operator in C# correct

2022-07-16 Thread Danil Sidoruk via Phabricator via cfe-commits
eoanermine created this revision. eoanermine added reviewers: owenpan, HazardyKnusperkeks, MyDeveloperDay. eoanermine added projects: clang, clang-format. Herald added a project: All. eoanermine requested review of this revision. Herald added a subscriber: cfe-commits. - Handle constructor invocat

[PATCH] D128907: [Clang] Disable noundef attribute for languages which allow uninitialized function arguments

2022-07-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. The consensus in the meeting was that we should try introducing a new argument attribute for values that are allowed to use undef values. It would need to be applied to the builtins and any wrapper functions for them. This would leave the normal language undefined behavi

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. It's a little confusing, because it now looks like _every_ `Type` in the AST is wrapped in an `ElaboratedTypeLoc` + `ElaboratedType`. IWYU's debug AST dump shows this (excerpt): tests/cxx/sizeof_reference.cc:51:8: (1) [ VarDecl ] size_t s2

[clang] b246574 - [clang-format][docs] Fix incorrect 'clang-format 7' option markers

2022-07-16 Thread Krystian Kuzniarek via cfe-commits
Author: Krystian Kuzniarek Date: 2022-07-16T18:19:11+02:00 New Revision: b2465748f236810944cf31f9438ac715e5362334 URL: https://github.com/llvm/llvm-project/commit/b2465748f236810944cf31f9438ac715e5362334 DIFF: https://github.com/llvm/llvm-project/commit/b2465748f236810944cf31f9438ac715e5362334.

[PATCH] D124625: [clang-format][docs] Fix incorrect 'clang-format 7' option markers

2022-07-16 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry added a comment. I forgot to add "Differential revision" footer to the commit message and so I've got to manually close this review. Sorry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124625/new/ https://reviews.llvm.org/D124625 _

[PATCH] D129934: [clang-format][docs] Fix incorrect 'clang-format 4' option markers

2022-07-16 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry created this revision. kuzkry added a reviewer: MyDeveloperDay. kuzkry added a project: clang-format. Herald added a project: All. kuzkry requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Introduced by 23a5090c6

[PATCH] D129934: [clang-format][docs] Fix incorrect 'clang-format 4' option markers

2022-07-16 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry added a comment. Hi! Here's a list of earliest commits where each option changed in this PR was introduced: ReflowComments - a0a5039d2e520fd42646cb305ed8b696acb41e63 SortIncludes - da446770823be1b1d1562734e55da7c1a5f2579c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov reopened this revision. mizvekov added a comment. In D112374#3653967 , @JDevlieghere wrote: > I'm sorry to hear you're having trouble building LLDB. The LLDB website has > quite an elaborate guide with instructions in how to build LLDB: > http

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. > It's the difference in knowing the type was written without any tag or > nested-name specifier, and having a type that you are not sure how it was > written. > > When we are dealing with a type which we are not sure, we would like to print > it fully qualified, with a s

[clang] bbc4a71 - [test] Fix leak in test

2022-07-16 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2022-07-16T12:41:12-07:00 New Revision: bbc4a71e413226798972a2180c306efade48ef4f URL: https://github.com/llvm/llvm-project/commit/bbc4a71e413226798972a2180c306efade48ef4f DIFF: https://github.com/llvm/llvm-project/commit/bbc4a71e413226798972a2180c306efade48ef4f.diff L

[PATCH] D129311: [clang-format] Update return code

2022-07-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/tools/clang-format/git-clang-format:539 # filter. - subprocess.check_call(['git', 'diff', '--diff-filter=M', old_tree, new_tree, - '--']) + return subprocess.call(['git', 'diff', '--diff-filter=M', +

[PATCH] D129940: [clang-format] Fix misannotation of colon in presence of requires clause

2022-07-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: MyDeveloperDay, curdeius, owenpan, JohelEGP, eoanermine. HazardyKnusperkeks added a project: clang-format. Herald added a project: All. HazardyKnusperkeks requested review of this revision. Herald added a project: clang.

[clang] a0458d9 - [clang-format] Never remove braces in macro definitions

2022-07-16 Thread via cfe-commits
Author: owenca Date: 2022-07-16T13:11:10-07:00 New Revision: a0458d92e9e7b279c9ff491429aad86ccedee7c4 URL: https://github.com/llvm/llvm-project/commit/a0458d92e9e7b279c9ff491429aad86ccedee7c4 DIFF: https://github.com/llvm/llvm-project/commit/a0458d92e9e7b279c9ff491429aad86ccedee7c4.diff LOG: [

[PATCH] D129921: [clang-format] Never remove braces in macro definitions

2022-07-16 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa0458d92e9e7: [clang-format] Never remove braces in macro definitions (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129921/new/ https

[PATCH] D129942: [clang-format] Indent TT_CtorInitializerColon after requires clauses

2022-07-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: owenpan, MyDeveloperDay, curdeius, JohelEGP, eoanermine. HazardyKnusperkeks added a project: clang-format. Herald added a project: All. HazardyKnusperkeks requested review of this revision. Herald added a project: clang.

[clang] 45067f8 - [test] Don't leak DerivedArgList in test

2022-07-16 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2022-07-16T14:03:38-07:00 New Revision: 45067f8fbf61284839c739807c2da2e2505661eb URL: https://github.com/llvm/llvm-project/commit/45067f8fbf61284839c739807c2da2e2505661eb DIFF: https://github.com/llvm/llvm-project/commit/45067f8fbf61284839c739807c2da2e2505661eb.diff L

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D112374#3657472 , @kimgr wrote: > I'm coming at this from pretty far away, so there's very likely lots of > details that I'm overlooking. But it seems to me the mainline had only had an > `ElaboratedType` node if there was e

[PATCH] D129946: [clang-format] Mark constexpr lambdas as lambda

2022-07-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: owenpan, MyDeveloperDay, curdeius, eoanermine. HazardyKnusperkeks added a project: clang-format. Herald added a project: All. HazardyKnusperkeks requested review of this revision. Herald added a project: clang. Herald ad

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D112374#3657472 , @kimgr wrote: > I can't say what the best solution is, but this patch generates quite a lot > of work for me, and I would really hope that catching up with the new AST > does not generate even more work dow

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-07-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. @kimgr One other general comment. The way this function is implemented is quite error prone: static const NamedDecl* TypeToDeclImpl(const Type* type, bool as_written) { // Get past all the 'class' and 'struct' prefixes, and namespaces. type = RemoveElaboration

[PATCH] D129940: [clang-format] Fix misannotation of colon in presence of requires clause

2022-07-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:820-833 + ASSERT_EQ(BaseTokens.size(), NumberOfBaseTokens) << BaseTokens; + ASSERT_EQ(ConstrainedTokens.size(), +NumberOfBaseTokens + NumberOfAdditionalRequiresClauseTokens) +

[clang] 0fbafb5 - [test] Fix memory leak in validateTargetProfile

2022-07-16 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2022-07-16T16:47:50-07:00 New Revision: 0fbafb5a1c4381ded4bc7f59a5a6091c229faed7 URL: https://github.com/llvm/llvm-project/commit/0fbafb5a1c4381ded4bc7f59a5a6091c229faed7 DIFF: https://github.com/llvm/llvm-project/commit/0fbafb5a1c4381ded4bc7f59a5a6091c229faed7.diff L

[PATCH] D129946: [clang-format] Mark constexpr lambdas as lambda

2022-07-16 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2130 case tok::kw_noexcept: +case tok::kw_constexpr: nextToken(); Maybe move it up

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-07-16 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. @python3kgae 0fbafb5a1c4381ded4bc7f59a5a6091c229faed7 is fixing leaks in this tests. Note, the leak was missed because of unrelated issues in gtest and lsan setup which we fixed recently. I incor

[clang] abc8f2b - [Driver] Don't passs --dynamic-linker in -r mode

2022-07-16 Thread Brad Smith via cfe-commits
Author: Brad Smith Date: 2022-07-16T20:13:24-04:00 New Revision: abc8f2b7245f5da09612784ca6e5e0f3dfe4b42d URL: https://github.com/llvm/llvm-project/commit/abc8f2b7245f5da09612784ca6e5e0f3dfe4b42d DIFF: https://github.com/llvm/llvm-project/commit/abc8f2b7245f5da09612784ca6e5e0f3dfe4b42d.diff LO

[PATCH] D129714: [Driver] Don't passs --dynamic-linker in -r mode

2022-07-16 Thread Brad Smith 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 rGabc8f2b7245f: [Driver] Don't passs --dynamic-linker in -r mode (authored by brad). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-07-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D125585#3657734 , @vitalybuka wrote: > @python3kgae > 0fbafb5a1c4381ded4bc7f59a5a6091c229faed7 > is > fixing leaks in this tests. > > Note, the leak w

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per per [range.iter.ops]/2 and [algorithms.requirements]/2, functions declared in the namesp

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 445285. cjdb added a comment. moves test from Sema to SemaCXX I Noticed that SemaCXX is only a test directory, and that there's no corresponding SemaCXX in either include or lib. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 445286. cjdb edited the summary of this revision. cjdb added a comment. updates an inaccuracy in the commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129951/new/ https://reviews.llvm.org/D129951 Files

[PATCH] D129953: [PATCH] [clang-tidy] NFC: add preposition "of" to code annotation of ElseAfterReturnCheck

2022-07-16 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou created this revision. zhouyizhou added reviewers: njames93, nridge, alexfh_, stephenkelly. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. zhouyizhou requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D129954: [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

2022-07-16 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: nikic, efriedma, lebedev.ri. Herald added subscribers: jsji, pengfei, kristof.beyls. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC inline asm docum

[PATCH] D129953: [PATCH] [clang-tidy] NFC: add preposition "of" to code annotation of ElseAfterReturnCheck

2022-07-16 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. While you're here could you also put full stops( or periods 🙃) at the end of the sentences. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Looking at the output from Clang 14 , I'm observing that a binary with 178 function templates is 13% the size of the one with 89 function objects. When only one function object is used vs all 178 function templates, the functions still win

[PATCH] D129953: [PATCH] [clang-tidy] NFC: add preposition "of" to code annotation of ElseAfterReturnCheck

2022-07-16 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D129953#3657920 , @njames93 wrote: > While you're here could you also put full stops( or periods 🙃) at the end of > the sentences. Thank Nathan for reviewing my patch I am here, and am very happy to make further enhancemen