[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485748. ccotter added a comment. - Add hasBody matcher support for coroutineBodyStmt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140794/new/ https://reviews.llvm.org/D140794 Files:

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2022-12-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 485747. python3kgae added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136031/new/ https://reviews.llvm.org/D136031 Files: llvm/lib/Target/DirectX/CBufferDataLayout.cpp

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485746. ccotter added a comment. spelling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files:

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485745. ccotter added a comment. move reference link Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140793/new/ https://reviews.llvm.org/D140793 Files:

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-reference-coroutine-parameters.rst:9 + +This check implements +[CppCoreGuideline CP.53](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).

[PATCH] D140757: [Hexagon][VE][WebAssembly] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros

2022-12-30 Thread Brad Smith via Phabricator via cfe-commits
brad updated this revision to Diff 485743. brad added a comment. Remove some whitespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140757/new/ https://reviews.llvm.org/D140757 Files: clang/lib/Basic/Targets/Hexagon.cpp

[PATCH] D140794: Add coroutineBodyStmt matcher

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added a subscriber: ChuanqiXu. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The coroutineBodyStmt matcher matches CoroutineBodyStmt AST nodes. Repository: rG

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added a comment. Passing and accessing a reference is safe if the access is done before any suspend point (taking into account whether the initial coroutine suspend actually suspends or not). Although CP.53 recommends warning on any reference parameter regardless of whether the code

[PATCH] D140793: [clang-tidy] Implement CppCoreGuideline CP.53

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter created this revision. Herald added subscribers: carlosgalvezp, shchenz, kbarton, xazax.hun, nemanjai. Herald added a reviewer: njames93. Herald added a project: All. ccotter requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D140547: Perform access checking to private members in simple requirement.

2022-12-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 485726. usaxena95 added a comment. Improved comment and added comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https://reviews.llvm.org/D140547 Files:

[PATCH] D140547: Perform access checking to private members in simple requirement.

2022-12-30 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 485725. usaxena95 added a comment. Perform access-dependent checks after transforming requires clause. This is more generic and less invasive than the previous version which changed `RebuildMemberExpr` and also produced duplicate diagnostics. Repository:

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. Thanks for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140772/new/ https://reviews.llvm.org/D140772 ___ cfe-commits

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in list(filter(lambda s: not s.endswith('.rst') and not s.endswith('.py'), - os.listdir(docs_dir))): + for subdir in

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in list(filter(lambda s: not s.endswith('.rst') and not s.endswith('.py'), - os.listdir(docs_dir))): + for subdir in

[PATCH] D136554: Implement CWG2631

2022-12-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @rupprecht You may consider contributing some interesting tests in a separate patch:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554

[clang] e632938 - [Sema] Avoid double hash lookup. NFCI

2022-12-30 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2022-12-30T19:25:38+01:00 New Revision: e6329388c39d18c428afdbbfd0f1330e782bc348 URL: https://github.com/llvm/llvm-project/commit/e6329388c39d18c428afdbbfd0f1330e782bc348 DIFF:

[PATCH] D140776: [clang][Interp] Handle defined functions without a body

2022-12-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. CI fails because other patches are missing, most likely https://reviews.llvm.org/D140668. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140776/new/ https://reviews.llvm.org/D140776 ___ cfe-commits mailing list

[PATCH] D140776: [clang][Interp] Handle defined functions without a body

2022-12-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 485714. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140776/new/ https://reviews.llvm.org/D140776 Files: clang/lib/AST/Interp/ByteCodeEmitter.cpp clang/test/AST/Interp/records.cpp Index: clang/test/AST/Interp/records.cpp

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in list(filter(lambda s: not s.endswith('.rst') and not s.endswith('.py'), - os.listdir(docs_dir))): + for subdir in

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Chris Cotter via Phabricator via cfe-commits
ccotter updated this revision to Diff 485710. ccotter added a comment. Fix isdir check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140772/new/ https://reviews.llvm.org/D140772 Files: clang-tools-extra/clang-tidy/add_new_check.py

[PATCH] D137838: [Support] Move TargetParsers to new component

2022-12-30 Thread Sam Elliott via Phabricator via cfe-commits
lenary added a comment. In D137838#4018930 , @vitalybuka wrote: > This bot is broken after the patch > https://lab.llvm.org/buildbot/#/builders/236/builds/1480 Thanks for letting me know. I'm back in the office on the 3rd, and it looks like this will

[PATCH] D136554: Implement CWG2631

2022-12-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 485703. cor3ntin added a comment. Finding the issue took about all day. I reduced your example to template int templated_func() { return 0; } struct test_body { int mem = templated_func(); }; struct S { int a = [] {

[PATCH] D138870: clang/AMDGPU: Remove flat-address-space from feature map

2022-12-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D138870#4020204 , @Joe_Nash wrote: > The code looks fine, but as you say, the change visible in user code and > could break something. Do you want to handle that somehow? Maybe wait for > @b-sumner OpenMP assumes flat

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-30 Thread Dani Ferreira Franco Moura via Phabricator via cfe-commits
merrymeerkat added a comment. @ymandel - thank you for pointing all of this out! And no need to apologise at all :) I agree that the changes made here are not ideal. But the alternative is also not ideal. The question becomes: is it better to model unions in a way that is lacking, or to not

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2022-12-30 Thread Dani Ferreira Franco Moura via Phabricator via cfe-commits
merrymeerkat updated this revision to Diff 485693. merrymeerkat added a comment. Extend documentation comment on storage locations with a FIXME about unions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140696/new/

[PATCH] D138870: clang/AMDGPU: Remove flat-address-space from feature map

2022-12-30 Thread Joe Nash via Phabricator via cfe-commits
Joe_Nash added a comment. The code looks fine, but as you say, the change visible in user code and could break something. Do you want to handle that somehow? Maybe wait for @b-sumner Comment at: clang/test/OpenMP/metadirective_device_isa_codegen_amdgcn.cpp:17 #pragma omp

[PATCH] D140776: [clang][Interp] Handle defined functions without a body

2022-12-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Turns out that this happens when explicitly

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:808 +void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo , + const PrintingPolicy ); (I also modified this function, so I added this

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2022-12-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project:

[PATCH] D140018: [clang-tidy] Support std::string_view in readability-redundant-string-cstr

2022-12-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @tberghammer Do you need help to land the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140018/new/ https://reviews.llvm.org/D140018 ___ cfe-commits mailing list

[PATCH] D140772: [clang-tidy] Fix minor bug in add_new_check.py

2022-12-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. LGTM, I have a suggestion for further improvement. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:324-328 doc_files = [] - for subdir in

[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march

2022-12-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5457 + // RISC-V will handle -mcpu option in Clang::AddRISCVTargetArgs. + if (!Triple.isRISCV()) { +// Add the target cpu kito-cheng wrote: > craig.topper wrote: > > I

[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march

2022-12-30 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 485674. kito-cheng added a comment. Changes: - Stop calling getRISCVTargetCPU in getCPUName. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140693/new/ https://reviews.llvm.org/D140693 Files: