[PATCH] D132905: [clang-format] Fix a bug in inserting braces at trailing comments

2022-08-30 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbc10ab8da1b5: [clang-format] Fix a bug in inserting braces at trailing comments (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] bc10ab8 - [clang-format] Fix a bug in inserting braces at trailing comments

2022-08-30 Thread via cfe-commits
Author: owenca Date: 2022-08-30T22:50:36-07:00 New Revision: bc10ab8da1b511e794fbed2396c60c87e2e05ef2 URL: https://github.com/llvm/llvm-project/commit/bc10ab8da1b511e794fbed2396c60c87e2e05ef2 DIFF: https://github.com/llvm/llvm-project/commit/bc10ab8da1b511e794fbed2396c60c87e2e05ef2.diff LOG:

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. Please mark https://reviews.llvm.org/D132911#inline-1279832 as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132911/new/ https://reviews.llvm.org/D132911

[clang] fed71b0 - [NFC] Add an invalid test case for clang/test/CXX/module/module.reach/ex1.cpp

2022-08-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-31T13:02:00+08:00 New Revision: fed71b04fb3cc6b1a5a21f64c26104962d816300 URL: https://github.com/llvm/llvm-project/commit/fed71b04fb3cc6b1a5a21f64c26104962d816300 DIFF: https://github.com/llvm/llvm-project/commit/fed71b04fb3cc6b1a5a21f64c26104962d816300.diff

[PATCH] D132991: [Clang] Give error message for invalid profile path when compiling IR

2022-08-30 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman added reviewers: xur, vsk. aidengrossman added a subscriber: mtrofin. aidengrossman added a comment. Pinging reviewers based on previous commits in `setPGOUseInstrumentor`. If there is an alternative method of writing this patch (eg placing the check in an equivalent of

[PATCH] D132991: [Clang] Give error message for invalid profile path when compiling IR

2022-08-30 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman created this revision. Herald added a subscriber: wenlei. Herald added a project: All. aidengrossman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this patch, when compiling an IR file (eg the .llvmbc section from an

[PATCH] D132990: [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-08-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: aaron.ballman, erichkeane, rsmith. Herald added a project: All. shafik requested review of this revision. Based on the changes introduced by 15361a21e01026e74cb17011b702c7d1c881ae94 it looks like C++17 compatibility diagnostic should have

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. There is another example we shouldn't make this specific for std::source_location::current(): https://github.com/llvm/llvm-project/issues/57459. I guess we can solve the issue too if we evaluate default argument at the caller position. Repository: rG LLVM Github

[clang] b1d5af8 - [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-31T11:09:46+08:00 New Revision: b1d5af81249dc7e5697faf9ee33f86012ccd8668 URL: https://github.com/llvm/llvm-project/commit/b1d5af81249dc7e5697faf9ee33f86012ccd8668 DIFF: https://github.com/llvm/llvm-project/commit/b1d5af81249dc7e5697faf9ee33f86012ccd8668.diff

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGb1d5af81249d: [docs] Add Standard C++ Modules (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. I'm going to land this. Thanks for everyone who reviewed this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 ___ cfe-commits mailing

[PATCH] D132907: [msan] Add more specific messages for use-after-destroy

2022-08-30 Thread Vitaly Buka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc059ede28ea8: [msan] Add more specific messages for use-after-destroy (authored by vitalybuka). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132907/new/

[clang] c059ede - [msan] Add more specific messages for use-after-destroy

2022-08-30 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2022-08-30T19:52:32-07:00 New Revision: c059ede28ea8faf0540cedad74bc5698ec59e744 URL: https://github.com/llvm/llvm-project/commit/c059ede28ea8faf0540cedad74bc5698ec59e744 DIFF: https://github.com/llvm/llvm-project/commit/c059ede28ea8faf0540cedad74bc5698ec59e744.diff

[PATCH] D132907: [msan] Add more specific messages for use-after-destroy

2022-08-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:1773 // function - EmitSanitizerDtorCallback(CGF, VTablePtr, PoisonSize); + EmitSanitizerDtorCallback(CGF, "__sanitizer_dtor_callback_vptr", +VTablePtr);

[PATCH] D132819: [RISCV] Add MC support of RISCV zcmp Extension

2022-08-30 Thread Liao Chunyu via Phabricator via cfe-commits
liaolucy added a comment. I found a lot of ZCE/zce, do we need to change ZCE to ZCMP? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132819/new/ https://reviews.llvm.org/D132819 ___ cfe-commits mailing

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @bbrown105 I am going to land this today. it looks like you're not objecting it and we don't have the time to wait for your formal approval... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3758898 , @aaronmondal wrote: > I just noticed that there probably needs to be one change. The doc sometimes > describes `-fprebuilt-module-interface`, which is not a valid option. I think > the occurrences were

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 456844. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131388/new/ https://reviews.llvm.org/D131388 Files: clang/docs/StandardCPlusPlusModules.rst clang/docs/index.rst Index: clang/docs/index.rst

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 marked 7 inline comments as done. jackhong12 added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2375-2378 +const FormatToken *Prev = PrevToken; +if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) && +

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 456836. jackhong12 retitled this revision from "Fix annotating when deleting array of pointers" to "[clang-format] Fix annotating when deleting array of pointers". jackhong12 edited the summary of this revision. jackhong12 added a comment. Add left

[PATCH] D132911: Fix annotating when deleting array of pointers

2022-08-30 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 456834. jackhong12 retitled this revision from "[clang-format] Fix annotating when deleting array of pointers" to "Fix annotating when deleting array of pointers". jackhong12 edited the summary of this revision. jackhong12 added a comment. Use

[clang] 146ae41 - Revert "[driver] Additional ignoring of module-map related flags, if modules are disabled"

2022-08-30 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2022-08-30T18:31:53-07:00 New Revision: 146ae4138a081a9a10e4901bbec61b629331da8a URL: https://github.com/llvm/llvm-project/commit/146ae4138a081a9a10e4901bbec61b629331da8a DIFF: https://github.com/llvm/llvm-project/commit/146ae4138a081a9a10e4901bbec61b629331da8a.diff

[PATCH] D132801: [driver] Additional ignoring of module-map related flags, if modules are disabled

2022-08-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This doesn't look right to me -- we still use module maps when modules are disabled to enforce layering checking, and when `-fmodules-local-submodule-visibility` is enabled but `-fmodules` is disabled we'll use them to provide modular semantics without pre-building

[PATCH] D132906: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Shafik Yaghmour 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 rGb9f767884669: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the… (authored by shafik). Herald added a project: clang.

[clang] b9f7678 - [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-30T18:08:44-07:00 New Revision: b9f767884669db0b5a56d87b0e8733614d8f884d URL: https://github.com/llvm/llvm-project/commit/b9f767884669db0b5a56d87b0e8733614d8f884d DIFF:

[PATCH] D132906: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:6957 // FIXME: We can defer doing this until the vtable is marked as used. -if (M->isDefaulted() && M->isConstexpr() && M->size_overridden_methods()) +if (CSM != CXXInvalid && M->isDefaulted()

[PATCH] D132906: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 456827. shafik added a comment. - Fixed formatting in test - Added release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132906/new/ https://reviews.llvm.org/D132906 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2375-2378 +const FormatToken *Prev = PrevToken; +if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) && +Prev->is(tok::l_square) && (Prev =

[PATCH] D132984: Set HOME for tests that use module cache path

2022-08-30 Thread Colin Cross via Phabricator via cfe-commits
ccross created this revision. ccross added a reviewer: pirama. Herald added a project: All. ccross requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Getting the default module cache path calls llvm::sys::path::cache_directory, which calls

[clang] 1877d76 - Revert "[clang][deps] Split translation units into individual -cc1 or other commands"

2022-08-30 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-30T15:50:09-07:00 New Revision: 1877d76aa011e6e481630523be5ed2d86d2b10f0 URL: https://github.com/llvm/llvm-project/commit/1877d76aa011e6e481630523be5ed2d86d2b10f0 DIFF: https://github.com/llvm/llvm-project/commit/1877d76aa011e6e481630523be5ed2d86d2b10f0.diff

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-30 Thread Ben Langmuir 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 rGf80a0ea76072: [clang][deps] Split translation units into individual -cc1 or other commands (authored by benlangmuir). Repository: rG LLVM Github

[clang] f80a0ea - [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-30 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-30T15:23:19-07:00 New Revision: f80a0ea760728e70f70debf744277bc3aa59bc17 URL: https://github.com/llvm/llvm-project/commit/f80a0ea760728e70f70debf744277bc3aa59bc17 DIFF: https://github.com/llvm/llvm-project/commit/f80a0ea760728e70f70debf744277bc3aa59bc17.diff

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) beanz wrote: > python3kgae wrote: > > Don't need

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D132952#3759731 , @efriedma wrote: > As a practical matter, there isn't any reason to force variably modified > parameters to make a function variably modified. The types of parameters > aren't visible in the caller of a

[PATCH] D132907: [msan] Add more specific messages for use-after-destroy

2022-08-30 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov accepted this revision. kstoimenov added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGClass.cpp:1773 // function - EmitSanitizerDtorCallback(CGF, VTablePtr, PoisonSize); +

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) python3kgae wrote: > Don't need to generate CtorCalls

[clang] 260fb2b - [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2022-08-30T14:57:15-07:00 New Revision: 260fb2bc3f79019cae4e182a64c8752d3d25049e URL: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e DIFF: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e.diff

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG260fb2bc3f79: [clang][modules] Dont hard code [no_undeclared_includes] for the Darwin module (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) Don't need to generate CtorCalls for lib profile

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-30 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked 2 inline comments as done. benlangmuir added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:295 +if (MDC) + MDC->applyDiscoveredDependencies(CI); +LastCC1Arguments = CI.getCC1CommandLine();

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, bogner, python3kgae, pow2clk, tex3d, eli.friedman. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL doesn't have a runtime loader

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 456800. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132713/new/ https://reviews.llvm.org/D132713 Files: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp

[PATCH] D132975: [clang][BOLT] Add clang-bolt target (WIP)

2022-08-30 Thread Amir Ayupov via Phabricator via cfe-commits
Amir updated this revision to Diff 456799. Amir added a comment. CMAKE_CURRENT_BINARY_DIR already contains bin/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132975/new/ https://reviews.llvm.org/D132975 Files: clang/CMakeLists.txt

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. As a practical matter, there isn't any reason to force variably modified parameters to make a function variably modified. The types of parameters aren't visible in the caller of a function; we only check the compatibility for calls. Trying to treat `void (*)(int,

[PATCH] D132975: [clang][BOLT] Add clangbolt target (WIP)

2022-08-30 Thread Amir Ayupov via Phabricator via cfe-commits
Amir created this revision. Amir added a reviewer: bolt. Herald added subscribers: treapster, wenlei, mgorny. Herald added a project: All. Amir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds `CLANG_BOLT_INSTRUMENT` option

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:220 void UseEqualsDefaultCheck::registerMatchers(MatchFinder *Finder) { - // Skip unions since constructors with empty bodies behave differently - // in

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D132971#3759538 , @Bigcheese wrote: > I'm fine with this change, but do we actually have a backwards compatibility > policy anywhere in Clang? Would be good to know what range of SDKs a compiler > release is expected to

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM. Up to you if you act on the last comment. Thanks for seeing this through! Comment at:

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 456774. beanz added a comment. Updating based on @aaron.ballman's feedback. - Change reinterpret_cast -> static_cast - Aaron likes `auto` more than me... but all in good places :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. I'm fine with this change, but do we actually have a backwards compatibility policy anywhere in Clang? Would be good to know what range of SDKs a compiler release is expected to support. Repository: rG LLVM Github Monorepo

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka accepted this revision. ributzka added a comment. This revision is now accepted and ready to land. Seems straightforward. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132971/new/ https://reviews.llvm.org/D132971

[PATCH] D120305: [Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON

2022-08-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. This commit caused following regression https://github.com/llvm/llvm-project/issues/57449#issuecomment-1232102039 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120305/new/ https://reviews.llvm.org/D120305

[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: bruno, ributzka, vsapsai, Bigcheese. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The Darwin module has specified [no_undeclared_includes] for at least

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132952#3759398 , @efriedma wrote: > In D132952#3759226 , @aaron.ballman > wrote: > >>> We could theoretically mess with the AST representation somehow, but I >>> don't see any

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/libclang/CXString.cpp:85 + if (String.empty()) +return createEmpty(); + egorzhdan wrote: > gribozavr2 wrote: > >

[PATCH] D131153: AArch64: disable asynchronous unwind by default for MachO.

2022-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:501 + /// IsAsyncUnwindTablesDefault - Does this tool chain use + /// -fasync-unwind-tables by default. + virtual bool smeenai wrote: > I believe the option is spelled

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I looked at the new `Concept auto` changes, they seem fine. Thanks a LOT @ychen for working on this, it's been a very interesting patch to me :) I'll let @mizvekov accept since he is much more experienced than me in those areas. Repository: rG LLVM Github

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please mark comments as done, when the discussion has ended. Comment at: clang/lib/Format/TokenAnnotator.cpp:2376 +const FormatToken *Prev = PrevToken; +if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) && +

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D132952#3759226 , @aaron.ballman wrote: >> We could theoretically mess with the AST representation somehow, but I don't >> see any compelling reason to. We probably just want to emit the >> warn_vla_used diagnostic

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments yusuke-kadowaki wrote: > MyDeveloperDay wrote: > > may be AcrossEmptyLines should be a number (to mean the

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:243 +AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), +, AST.UnsignedIntTy, +AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()),

[PATCH] D132906: [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor test formatting nit. Please be sure to also write a release note for the fix. Comment at:

[PATCH] D127695: WIP: clang: Implement Template Specialization Resugaring

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: libcxx/utils/ci/buildkite-pipeline.yml:377 +CFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir" +CXXFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir" LLVM_SYMBOLIZER_PATH:

[PATCH] D132874: [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9aba6007451: [clang] Dont emit debug vtable information for consteval functions (authored by luken-google). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] c9aba60 - [clang] Don't emit debug vtable information for consteval functions

2022-08-30 Thread Luke Nihlen via cfe-commits
Author: Luke Nihlen Date: 2022-08-30T19:10:15Z New Revision: c9aba600745131fca4f7333d7c2e21556c2577cc URL: https://github.com/llvm/llvm-project/commit/c9aba600745131fca4f7333d7c2e21556c2577cc DIFF: https://github.com/llvm/llvm-project/commit/c9aba600745131fca4f7333d7c2e21556c2577cc.diff LOG:

[PATCH] D132056: [HLSL] Restrict to supported targets

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 456746. beanz added a comment. Adding the FIXME suggested by @aaron.ballman. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132056/new/ https://reviews.llvm.org/D132056 Files:

[PATCH] D132945: [clang] Skip re-building lambda expressions in parameters to consteval fns.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 456745. usaxena95 added a comment. This actually fixes two more issues. Update release notes and add more documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132945/new/

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:108-113 +if (Template) { + if (auto TTD = dyn_cast( + Template->getTemplateParameters()->getParam(0))) +Ty = Record->getASTContext().getPointerType( +

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D128750#3758750 , @mizvekov wrote: > Just a first glance at the patch, will try to do a more comprehensive review > later. Thanks! Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1838 -QualType

[PATCH] D127695: WIP: clang: Implement Template Specialization Resugaring

2022-08-30 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added subscribers: ldionne, Mordante. Mordante added inline comments. Comment at: libcxx/utils/ci/buildkite-pipeline.yml:377 +CFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir" +CXXFLAGS: "-fcrash-diagnostics-dir=crash_diagnostics_dir"

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132952#3759109 , @efriedma wrote: >> We have the VariableArrayType to represent a VLA type and I think we're >> using that type when we should be using a variably modified type > > The clang AST for function signatures

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-08-30 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 456743. ychen marked an inline comment as done. ychen added a comment. - For function templates, compare canonical types of funtion parameters directly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128750/new/

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-30 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:910 if (FD->getParent()->isUnion()) -return StrictFlexArraysLevel < 2; +return true; RecordDecl::field_iterator FI( This is a functional change (which is good,

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: libc++. aaron.ballman added a comment. Thanks for working on this; these sort of improvements to compile time overhead are very much appreciated! Has this been tested against libc++ (our preccommit CI doesn't test that), and if so, do all the results come back

[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The reason struct returns require register shuffling is that AArch64 passes the sret pointer in x8 (i.e. RAX), but the x64 calling convention expects in in RCX (i.e. x0). Have you tried to see if the Microsoft-generated thunk actually works? I found at least one bug

[PATCH] D132945: [clang] Skip re-building lambda expressions in parameters to consteval fns.

2022-08-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 456739. usaxena95 added a comment. Add some test with expected errors as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132945/new/ https://reviews.llvm.org/D132945 Files: clang/docs/ReleaseNotes.rst

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd40245f549b: [clang-tidy] Fix false positive on ArrayInitIndexExpr inside… (authored by isuckatcs). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] cd40245 - [clang-tidy] Fix false positive on ArrayInitIndexExpr inside ProBoundsConstantArrayIndexCheck

2022-08-30 Thread via cfe-commits
Author: isuckatcs Date: 2022-08-30T20:27:38+02:00 New Revision: cd40245f549b8bd7a5b6571c2eb6a882ce59acc9 URL: https://github.com/llvm/llvm-project/commit/cd40245f549b8bd7a5b6571c2eb6a882ce59acc9 DIFF: https://github.com/llvm/llvm-project/commit/cd40245f549b8bd7a5b6571c2eb6a882ce59acc9.diff

[PATCH] D132962: [clangd][ObjC] Improve completions for protocols + category names

2022-08-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. - Render

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3524 + // Preserve vec3 for HLSL. + CmdArgs.push_back("-fpreserve-vec3-type"); } Preserving vec3 is required for HLSL correctness, this shouldn't be tied to the DXC driver mode.

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > We have the VariableArrayType to represent a VLA type and I think we're using > that type when we should be using a variably modified type The clang AST for function signatures encodes two types: the type as written, and the type after promotion. Semantic analysis

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 456731. beanz added a comment. Updating based on PR feedback and rebasing. - Rebased on main today - Made const subscript return type const & Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131268/new/

[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers

2022-08-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/TokenAnnotator.cpp:2381-2385 if (PrevToken->Tok.isLiteral() || PrevToken->isOneOf(tok::r_paren, tok::r_square,

[PATCH] D131153: AArch64: disable asynchronous unwind by default for MachO.

2022-08-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I just discovered this and was about to post on Discourse about it. Glad you're already on it :) I don't think this is quite correct though? It'll turn off unwind tables for AArch64 entirely, whereas we want to keep sync unwind tables. If we want to minimize changes

[PATCH] D129488: [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129488#3758798 , @ilya-biryukov wrote: > I was also under impression that this should fall out of the C++ semantics, > but after playing around with it I am not so sure anymore. I'm also starting to question that.

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 456715. isuckatcs marked an inline comment as done. isuckatcs added a comment. Removed the unnecessary extra RUN command. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132654/new/ https://reviews.llvm.org/D132654 Files:

[clang] de8f372 - [Docs] Fixing incorrect document title

2022-08-30 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-08-30T12:19:05-05:00 New Revision: de8f372bfec7070a364fac57fb5f201fc2d8cb22 URL: https://github.com/llvm/llvm-project/commit/de8f372bfec7070a364fac57fb5f201fc2d8cb22 DIFF:

[PATCH] D132672: [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG739a747b2368: [Docs] [HLSL] Documenting HLSL Entry Functions (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132672/new/

[clang] 739a747 - [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-30 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-08-30T12:18:44-05:00 New Revision: 739a747b2368652155ac78f0ac341a6bfe640c60 URL: https://github.com/llvm/llvm-project/commit/739a747b2368652155ac78f0ac341a6bfe640c60 DIFF:

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-08-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 456710. tejohnson marked 5 inline comments as done. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128142/new/ https://reviews.llvm.org/D128142 Files:

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-08-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 12 inline comments as done. tejohnson added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1252 +AllocInfo->Info.getMinLifetime()); + SmallVector StackIds; + std::set StackHashSet;

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:58 +/// them before we initialize the ExternalSemaSource base class. +struct ChainedHLSLExternalSemaSourceMembers { + ChainedHLSLExternalSemaSourceMembers(ExternalSemaSource *ExtSema)

[PATCH] D131707: [analyzer][NFC] Cache the result of getLocationType in TypedValueRegion

2022-08-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > So I think the most valuable optimizations are low-level optimizations to > `ImmutableMap`. There were a few suggestions on the mailing list to use > something more modern than the AVL trees under the hood but I don't think > authors found much success with those.

[PATCH] D132932: [Clang][Comments] Parse `` in doc comments correctly

2022-08-30 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan marked an inline comment as done. egorzhdan added inline comments. Comment at: clang/tools/libclang/CXString.cpp:85 + if (String.empty()) +return createEmpty(); + gribozavr2 wrote: > Please split this change into a separate patch and add a unit

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:860 +} else if (const auto *ND = Unexpanded[I].first.get(); + isa(ND)) { + // Function parameter pack or init-capture pack.

[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a0309c53674: [clang] Improve diagnostics for expansion length mismatch (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128095/new/

[clang] 3a0309c - [clang] Improve diagnostics for expansion length mismatch

2022-08-30 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-08-30T18:58:38+02:00 New Revision: 3a0309c53674be56b5cfce038d78a0c2c6e2a98c URL: https://github.com/llvm/llvm-project/commit/3a0309c53674be56b5cfce038d78a0c2c6e2a98c DIFF:

[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=

2022-08-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Another test under llvm-project/clang/test/CodeGen/ is needed which tests IR generated from C/C++ contains expected info. Random example clang/test/CodeGen/attr-noundef.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-30 Thread Aaron Siddhartha Mondal via Phabricator via cfe-commits
aaronmondal requested changes to this revision. aaronmondal added a comment. This revision now requires changes to proceed. I just noticed that there probably needs to be one change. The doc sometimes describes `-fprebuilt-module-interface`, which is not a valid option. I think the occurrences

[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

2022-08-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D132352#3757433 , @ChuanqiXu wrote: > In D132352#3757415 , @rjmccall > wrote: > >> Stackful coroutine bodies should be straightforward to support on top of the >> other work you've

  1   2   >