[PATCH] D139446: [clangd] Add flag to control #import include insertions

2023-01-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:271 +desc("If header insertion is enabled, add #import directives when " + "accepting code comple

[PATCH] D141032: [Clang][RISCV] Expose vlenb to vread_csr

2023-01-04 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added inline comments. Comment at: clang/include/clang/Basic/riscv_vector.td:1559 __asm__ __volatile__ ("csrw\tvcsr, %z0" : : "rJ"(__value) : "memory"); break; } Should we report errors if `vwrite_csr(RVV_VLENB, some_value)`? Repos

[PATCH] D141032: [Clang][RISCV] Expose vlenb to vread_csr

2023-01-04 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. eopXD added reviewers: craig.topper, kito-cheng, frasercrmck. Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edwa

[PATCH] D139847: Also allow __is_unsigned to be used as an identifier

2023-01-04 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg abandoned this revision. sberg added a comment. In D139847#4026966 , @aaron.ballman wrote: > Do you know if folks are hitting problems here in practice, or is this > speculative? It had hit me when building LibreOffice against libstdc++ 13 trunk,

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2023-01-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D140155#4016333 , @jhuber6 wrote: > In D140155#4016274 , @mgorny wrote: > >> In D140155#4004505 , @doru1004 >> wrote: >> >>> Commit 658ed9547

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2023-01-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D139723#4016685 , @mgorny wrote: > I've pushed a fix in dab67c66932b9149842f7c8431e951f952125fc0 > , based > on @jhuber6's fix from the other diff. Thank

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @ben.boeckel I updated the test with compilation db. BTW, I am curious that according to https://reviews.llvm.org/D137534, cmake may not use clang-scan-deps with compilation db for P1689 . So this is a pure review comment and it is not

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 486472. ChuanqiXu added a comment. Add the test to generate make-style dependency file with compilation database. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 Files: clang/include/clang/Tooling/Depe

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

2023-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros.c:4337 +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target hexagon-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_HEXA

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-04 Thread Frederic Riss via Phabricator via cfe-commits
friss updated this revision to Diff 486466. friss added a comment. Rebase correctly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136651/new/ https://reviews.llvm.org/D136651 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/in

[PATCH] D140956: [clang-format] Add an option for breaking after C++11 attributes

2023-01-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D140956#4025614 , @MyDeveloperDay wrote: > Should we care about other forms of attributes like `__stdcall` etc..? I > personally don't, just I assume from the tests this isn't covered (maybe just > add that limitation to the

[PATCH] D140956: [clang-format] Add an option for breaking after C++11 attributes

2023-01-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 486445. owenpan retitled this revision from "[clang-format] Add an option for breaking after C++ attributes" to "[clang-format] Add an option for breaking after C++11 attributes". owenpan edited the summary of this revision. owenpan added a comment. - Delete

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 486453. MaskRay added a comment. show that C23 `[[noreturn]]` codegen is unaffected. The diff base improves `attr-noreturn.c` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140868/new/ https://reviews.llvm.org/

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D139168#4026799 , @ben.boeckel wrote: > In D139168#4025277 , @ChuanqiXu > wrote: > >> Currently we will detect `-MF` in the command line and we will write the >> make-format depend

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D140868#4027480 , @MaskRay wrote: > I am not a C language lawyer :) I wonder what else should be done to move > this patch forward. > The https://github.com/llvm/llvm-project/issues/59792 has got some traction > and has been

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > Note that multi-arch builds are an open question (just like multi-arch .pcm > files are I believe); the format could support it as two reports on > provides/reqs, but the merged object file complicates things. BTW, we decide to forbid multiple-arch .pcm files in ht

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

2023-01-04 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin accepted this revision. aheejin added a comment. All Wasm atomics are sequentially consistent; If that's supported by this macro, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140757/new/ https://reviews.llvm.org/D140757 ___

[PATCH] D136554: Implement CWG2631

2023-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D136554#4021754 , @cor3ntin wrote: > In D136554#4020387 , @MaskRay wrote: > >> @rupprecht You may consider contributing some interesting tests (which work >> before this patch) in a se

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2023-01-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D138329#4027490 , @thakis wrote: > The `clang` binary should not depend on `ASTMatchers`. > > I see this isn't new in this patch, but `ASTMatchers` should only be used > from clang-tidy, not from the compiler itself. ASTMatchers

[PATCH] D136554: Implement CWG2631

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. reduced to this lovely thing template struct d {}; template struct f : d<__is_constructible(e)> { using type = bool; }; template ::type> int *l; int m; struct p { int o = m; p() {} }; int* i(l); SemaExpr.cpp:19857: void DoMarkVarDec

[PATCH] D141013: amdgpu-arch: Prefer hsa/hsa.h over hsa.h

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. 39a83ebd47fb56da5c1bd9dd976b70d551656cab CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141013/new/ https://reviews.llvm.org/D141013 __

[clang] 39a83eb - amdgpu-arch: Prefer hsa/hsa.h over hsa.h

2023-01-04 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-01-04T20:51:51-05:00 New Revision: 39a83ebd47fb56da5c1bd9dd976b70d551656cab URL: https://github.com/llvm/llvm-project/commit/39a83ebd47fb56da5c1bd9dd976b70d551656cab DIFF: https://github.com/llvm/llvm-project/commit/39a83ebd47fb56da5c1bd9dd976b70d551656cab.diff

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. As someone who has no idea what this does, this seems to be missing docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136651/new/ https://reviews.llvm.org/D136651 ___ cfe-co

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-04 Thread Frederic Riss via Phabricator via cfe-commits
friss added inline comments. Comment at: clang/tools/clang-stat-cache/clang-stat-cache.cpp:291 + IsCaseSensitive = + ::pathconf(TargetDirectory.c_str(), _PC_CASE_SENSITIVE) == 1; +#endif benlangmuir wrote: > Is this pathconf extension Darwin-only? I don't t

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-04 Thread Frederic Riss via Phabricator via cfe-commits
friss updated this revision to Diff 486439. friss added a comment. Address review feedback Move StatCacheFileSystem to its own file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136651/new/ https://reviews.llvm.org/D136651 Files: clang/include/

[clang] 22b65a3 - [NFC][Clang][ASTTests] Use ASSERT instead of EXPECT for nullptr checks

2023-01-04 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2023-01-04T17:33:12-08:00 New Revision: 22b65a329ac2621279ae211dd6a868198e68d149 URL: https://github.com/llvm/llvm-project/commit/22b65a329ac2621279ae211dd6a868198e68d149 DIFF: https://github.com/llvm/llvm-project/commit/22b65a329ac2621279ae211dd6a868198e68d149.dif

Re: [clang] f58b025 - Revert "[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations"

2023-01-04 Thread Roman Lebedev via cfe-commits
Reminder to please always mention the reason for the revert/recommit in the commit message. On Thu, Jan 5, 2023 at 4:24 AM Ziqing Luo via cfe-commits wrote: > > > Author: Ziqing Luo > Date: 2023-01-04T17:16:21-08:00 > New Revision: f58b025354ee2d3bcd7ab2399a11429ec940c1e0 > > URL: > https://gith

[clang] f58b025 - Revert "[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations"

2023-01-04 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-01-04T17:16:21-08:00 New Revision: f58b025354ee2d3bcd7ab2399a11429ec940c1e0 URL: https://github.com/llvm/llvm-project/commit/f58b025354ee2d3bcd7ab2399a11429ec940c1e0 DIFF: https://github.com/llvm/llvm-project/commit/f58b025354ee2d3bcd7ab2399a11429ec940c1e0.diff LO

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2023-01-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Unrelatedly, this doesn't build on Windows: http://45.33.8.238/win/72750/step_4.txt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138329/new/ https://reviews.llvm.org/D138329 ___

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-01-04 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:313-319 + /// ClearExprs - Null out any expression references, which prevents + /// them from being 'delete'd later. + void ClearExprs(Sema &Actions) {} + + /// FreeExprs - Release any unclaimed memo

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-01-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 486436. void marked 4 inline comments as done. void added a comment. Herald added subscribers: libcxx-commits, kadircet. Herald added projects: libc++abi, clang-tools-extra. Herald added a reviewer: libc++abi. Combine the array designator internals and templatize

[PATCH] D51948: [analyzer] Add ExprMutationAnalyzer

2023-01-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, baloghadamsoftware. Herald added a project: All. Old review, but `clang` binary should not depend on ASTMatchers. It's fine if ExprMutationAnalyzer isn't used within clang, but then it should g

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2023-01-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The `clang` binary should not depend on `ASTMatchers`. I see this isn't new in this patch, but `ASTMatchers` should only be used from clang-tidy, not from the compiler itself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2023-01-04 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. Closed by commit rGf84f17c489f7: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations (authored by ziqingluo-90). Changed prior to commit:

[clang] f84f17c - [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

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

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-04 Thread Sam James via Phabricator via cfe-commits
thesamesam added a comment. Confirmed this patch fixes the miscompile. Right. While the spec side needs discussion (and almost certainly addressing!), I don't think anyone in the real world is expecting the Clang behaviour vs the GCC one. The Clang one as-is is the one that's less conservative,

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am not a C language lawyer :) I wonder what else should be done to move this patch forward. The https://github.com/llvm/llvm-project/issues/59792 has got some traction and has been added a candidate for the next 15.x patch release https://github.com/llvm/llvm-project/

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas marked 5 inline comments as done. manas added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1638-1639 + if (LHS.isUnsigned() && (LHS.getBitWidth() >= RHS.getBitWidth())) { +if (RHS.getMaxValue().isNegative() || +

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 486425. manas added a comment. Re-introduce bitwidth comparison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintMa

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D140086#4010175 , @steakhal wrote: >> This test fails. >> >> void testfoo(unsigned char u, signed int s) { >> if (u >= 253 && u <= 255 && s < INT_MAX - 2) { >> // u: [253, 254], s: [INT_MIN, INT_MAX - 2] >> clan

[clang] b2ac5fd - [-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations

2023-01-04 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-01-04T15:51:56-08:00 New Revision: b2ac5fd724c44cf662caed84bd8f84af574b981d URL: https://github.com/llvm/llvm-project/commit/b2ac5fd724c44cf662caed84bd8f84af574b981d DIFF: https://github.com/llvm/llvm-project/commit/b2ac5fd724c44cf662caed84bd8f84af574b981d.diff LO

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2023-01-04 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. Closed by commit rGb2ac5fd724c4: [-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips… (authored by ziqingluo-90). Repository: rG LLVM Github Mon

[PATCH] D140159: [clang][nfc] Fixes for D129531

2023-01-04 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao abandoned this revision. ayzhao added a comment. Abandoning as the underlying commit was reverted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140159/new/ https://reviews.llvm.org/D140159 ___ cf

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:40 +static llvm::Type *getSPIRVType(llvm::LLVMContext &Ctx, StringRef BaseType, +StringRef OpenCLName, StringRef ReadSuffix) { + SmallVector IntParams = {0, 0, 0, 0, 0,

[clang] 4e02ff2 - [clang] Revert parentesized aggregate initalization patches

2023-01-04 Thread Alan Zhao via cfe-commits
Author: Alan Zhao Date: 2023-01-04T15:09:36-08:00 New Revision: 4e02ff2303f8a69cc2459b77bbb879b248df6ca9 URL: https://github.com/llvm/llvm-project/commit/4e02ff2303f8a69cc2459b77bbb879b248df6ca9 DIFF: https://github.com/llvm/llvm-project/commit/4e02ff2303f8a69cc2459b77bbb879b248df6ca9.diff LOG

[PATCH] D108265: .clang-tidy: Push variable related readability-identifier-naming options down to projects

2023-01-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (at least if/when D140585 sticks, then the format should be reflected at the top level, not omitted/left to subprojects to specify - then/at the same time, the explicit naming convention specified in mlir, compiler-rt, etc, should be

[PATCH] D108265: .clang-tidy: Push variable related readability-identifier-naming options down to projects

2023-01-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. My objections to this initially still seem to stand - the discourse thread doesn't appear to have shown more consensus & I still don't think we should remove a top level naming convention entirely. We should have a convention documented and specified in the top level f

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added inline comments. Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:40 +static llvm::Type *getSPIRVType(llvm::LLVMContext &Ctx, StringRef BaseType, +StringRef OpenCLName, StringRef ReadSuffix) { + SmallVector IntParams = {0, 0,

[PATCH] D140860: [Diagnostics][NFC] Fix -Wlogical-op-parentheses warning inconsistency for const and constexpr values

2023-01-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > This behavior can lead to the lack of warnings for complicated constexpr > expressions. Are those bugs, though? If the parentheses wouldn't change the outcome, due to the RHS being constant, maybe these undiagnosed cases aren't reflective of source code bugs/coding

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @jcranmer-intel, thanks a lot for working on this. I'm so excited to see these changes! Overall, it looks good to me, but I'd like to avoid some runtime computations if possible. Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:40 +static llvm::Type *g

[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS

2023-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/ZOS.cpp:22 +: ToolChain(D, Triple, Args) { + for (Arg *A : Args.filtered(options::OPT_pg)) { +auto ArgString = A->getAsString(Args); francii wrote: > @MaskRay we still need `-pg` to e

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

2023-01-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 486390. python3kgae added a comment. Add unit test. 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 llvm/

[PATCH] D140984: [clang] Correct -frewrite-includes generation of line control directives with mixed EOL forms.

2023-01-04 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann updated this revision to Diff 486384. tahonermann added a comment. Addressed Corentin's review feedback. Thank you, Corentin! I'm going to remember to update the release notes doc all on my own one of these days, I'm sure of it! :) Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D141013: amdgpu-arch: Prefer hsa/hsa.h over hsa.h

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, JonChesterfield. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. arsenm requested review of this revision. Herald added a subscriber: wdng. The header now prints a warning if y

[PATCH] D140292: [OpenMP] Migrate OpenMPOffloadMappingFlags from Clang CodeGen to OMPConstants

2023-01-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140292/new/ https://reviews.llvm.org/D140292 __

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/CodeGenOpenCL/cast_image.cl:2 // RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple amdgcn--amdhsa %s | FileCheck --check-prefix=AMDGCN %s -// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple spir-unknown

[clang] 91fefaa - Revert "[Sema] Don't mark deleted special member functions as non-trivial"

2023-01-04 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2023-01-04T22:39:04+02:00 New Revision: 91fefaa62ea5bfa6b7e85214ab58aae45017365f URL: https://github.com/llvm/llvm-project/commit/91fefaa62ea5bfa6b7e85214ab58aae45017365f DIFF: https://github.com/llvm/llvm-project/commit/91fefaa62ea5bfa6b7e85214ab58aae45017365f.diff

[PATCH] D140507: Parse: handle another case of invalid handling for attributes

2023-01-04 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! Should this also get a release note or do you think the current one covers it well enough? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D139847: Also allow __is_unsigned to be used as an identifier

2023-01-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not opposed to this, but it's unfortunate that this hack is broader than it needs to be because we apply this parsing logic in all circumstances, not just within a system header. However, because we already behave this way for `__is_signed`, and it seems that

[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS

2023-01-04 Thread Michael Francis via Phabricator via cfe-commits
francii added inline comments. Comment at: clang/lib/Driver/ToolChains/ZOS.cpp:22 +: ToolChain(D, Triple, Args) { + for (Arg *A : Args.filtered(options::OPT_pg)) { +auto ArgString = A->getAsString(Args); @MaskRay we still need `-pg` to error-out on z/OS.

[PATCH] D140292: [OpenMP] Migrate OpenMPOffloadMappingFlags from Clang CodeGen to OMPConstants

2023-01-04 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 486360. TIFitis added a comment. Fixed clang-format issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140292/new/ https://reviews.llvm.org/D140292 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp llvm/incl

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

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486357. usaxena95 added a comment. Return a valid RequriesExpr instead of a ExprError in case of depenedent diagnositcs. We would also need to store the diagnositcs in the RequiresExpr for better diagnosis. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added a comment. Most of the testing for this change has been in conjunction with the changes in the SPIRV-LLVM-Translator repository here: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1799. I haven't updated the in-tree experimental target to support the target-ext

[clang] 3ba051b - Revert "[clang] Add the check of membership in decltype for the issue #58674#"

2023-01-04 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2023-01-04T11:44:23-08:00 New Revision: 3ba051b15bd3476f72ad534ffb8ca2e12457620f URL: https://github.com/llvm/llvm-project/commit/3ba051b15bd3476f72ad534ffb8ca2e12457620f DIFF: https://github.com/llvm/llvm-project/commit/3ba051b15bd3476f72ad534ffb8ca2e12457620f.diff L

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel created this revision. Herald added subscribers: ldrumm, wenlei, ThomasRaoux, arphaman, Anastasia, yaxunl. Herald added a project: All. jcranmer-intel requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Reposit

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added a comment. In D139168#4025277 , @ChuanqiXu wrote: > Currently we will detect `-MF` in the command line and we will write the > make-format dependency output to the corresponding file once we find `-MF`. When using `clang-scan-deps` wit

[PATCH] D140664: [Sema] Don't mark deleted special member functions as non-trivial

2023-01-04 Thread Roy Jacobson 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 rGd5dd37ac139a: [Sema] Don't mark deleted special member functions as non-trivial (authored by royjacobson). Repository: rG LLVM Github Monorepo CH

[clang] d5dd37a - [Sema] Don't mark deleted special member functions as non-trivial

2023-01-04 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2023-01-04T21:27:04+02:00 New Revision: d5dd37ac139a74701e16f084eb2609ff58893770 URL: https://github.com/llvm/llvm-project/commit/d5dd37ac139a74701e16f084eb2609ff58893770 DIFF: https://github.com/llvm/llvm-project/commit/d5dd37ac139a74701e16f084eb2609ff58893770.diff

[PATCH] D140664: [Sema] Don't mark deleted special member functions as non-trivial

2023-01-04 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 486347. royjacobson added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140664/new/ https://reviews.llvm.org/D140664 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added a comment. In D139168#4025277 , @ChuanqiXu wrote: > Currently we will detect `-MF` in the command line and we will write the > make-format dependency output to the corresponding file once we find `-MF`. Which is fine, but docs need to

[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-04 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 +else if (const auto *ND = dyn_cast(Context)) { + if (ND->isInlineNamespace()) +Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); kadirce

[PATCH] D140992: clang: Add __builtin_elementwise_fma

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:2615 QualType ArgTy = TheCall->getArg(0)->getType(); -QualType EltTy = ArgTy; - -if (auto *VecTy = EltTy->getAs()) - EltTy = VecTy->getElementType(); -if (!EltTy->isFloatingType()) { -

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D141000#4026600 , @Eugene.Zelenko wrote: > Looks OK for me, but probably will be good idea to remove check-specific > options in same commit. Thanks for the review! Sure, I can do that, I just thought we should try to

[PATCH] D140059: [APSInt] Fix bug in APSInt mentioned in https://github.com/llvm/llvm-project/issues/59515

2023-01-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:5386 + if (InitInt) +InitExpr = DBuilder.createConstantValueExpression(InitInt.value()); +} else if (Init.isFloat()) I think we actually want the existing behavior here

[PATCH] D140992: clang: Add __builtin_elementwise_fma

2023-01-04 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:2615 QualType ArgTy = TheCall->getArg(0)->getType(); -QualType EltTy = ArgTy; - -if (auto *VecTy = EltTy->getAs()) - EltTy = VecTy->getElementType(); -if (!EltTy->isFloatingType()) {

[PATCH] D140992: clang: Add __builtin_elementwise_fma

2023-01-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Need update clang/docs/ReleaseNotes.rst for new intrinsic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140992/new/ https://reviews.llvm.org/D140992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D140983: [IRBuilder] Use canonical i64 type for insertelement index used by vector splats.

2023-01-04 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm updated this revision to Diff 486332. paulwalker-arm added a comment. Herald added a reviewer: bollu. Update poly tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140983/new/ https://reviews.llvm.org/D140983 Files: clang/test/

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks OK for me, but probably will be good idea to remove check-specific options in same commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141000/new/ https://reviews.llvm.org/D141000 __

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-04 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4025356 , @vedgy wrote: > `clang_disposeIndex()` would have to un-override the temporary directory > then. I'll have to check whether this un-overriding happens too early (before > all //preamble-*.pch// files are remov

[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS

2023-01-04 Thread Michael Francis via Phabricator via cfe-commits
francii added a comment. In D137756#4023531 , @hubert.reinterpretcast wrote: > In D137756#4018666 , @MaskRay wrote: > >> Most targets reject `-p` now. It's unnecessary to have another z/OS specific >> diagnostic

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary edited the summary of this revision. lenary updated this revision to Diff 486324. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140999/new/ https://reviews.llvm.org/D140999 Files: clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Target

[PATCH] D140959: RFC: Multilib prototype

2023-01-04 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Multilib2.h:33-34 +private: + std::vector, std::vector>> Multilibs; + std::vector, std::vector>> RegexAttributes; +}; I think it'd really help readability and comprehension if this was model

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added subscribers: arphaman, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. We have a number o

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

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486313. usaxena95 marked an inline comment as done. usaxena95 added a comment. Added more tests. Still investigating libcxx failure and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https:/

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary added reviewers: tmatheson, pratlucas, MaskRay. lenary added a comment. Herald added subscribers: StephenFan, JDevlieghere. Adding some relevant reviewers. My plan is to land the other patches like this directly onto `main`, as they are NFC and a cleanup. I hope this is uncontroversial, b

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary created this revision. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. lenary requested review of this revision. Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, MaskRay. Herald added projects: clang, LLDB, LLVM. This deprecates, but does n

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-01-04 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a created this revision. bolshakov-a added reviewers: aaron.ballman, rsmith, mizvekov. Herald added subscribers: kadircet, arphaman, martong, kristof.beyls. Herald added a reviewer: shafik. Herald added a project: All. bolshakov-a requested review of this revision. Herald added projects:

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D139586#4000309 , @hubert.reinterpretcast wrote: > At least on the surface, it looks like there will be a lot of trouble to deal > with default arguments: > > struct A { A(); ~A(); int x[3]; }; > int (&f(const A & = A())

[PATCH] D140970: [BPF] preserve btf_decl_tag for parameters of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 486295. eddyz87 added a comment. Fix for formatting issue reported by CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140970/new/ https://reviews.llvm.org/D140970 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D140292: [OpenMP] Migrate OpenMPOffloadMappingFlags from Clang CodeGen to OMPConstants

2023-01-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can you please check why there are so many reformatted lines are part of this patch? Is the clang-format version up to date? Maybe it changed but we should only format the parts touched by the patch, hence `git-clang-format HEAD~` rather than format everything. Repo

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This is a big improvement, I skimmed through it and looks good to me. There might be some sneaky ways to change values of fields without mentioning them, e.g., casting a pointer to a struct to an array of chars. But I think reasoning

[PATCH] D137531: [clang] Add the check of membership in decltype for the issue #58674

2023-01-04 Thread Erich Keane 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 rG85960043d594: [clang] Add the check of membership in decltype for the issue #58674# (authored by lime, committed by erichkeane). Repository: rG LL

[clang] 8596004 - [clang] Add the check of membership in decltype for the issue #58674#

2023-01-04 Thread Erich Keane via cfe-commits
Author: Liming Liu Date: 2023-01-04T07:47:17-08:00 New Revision: 85960043d594fc12d340ccb66a30861b023ab496 URL: https://github.com/llvm/llvm-project/commit/85960043d594fc12d340ccb66a30861b023ab496 DIFF: https://github.com/llvm/llvm-project/commit/85960043d594fc12d340ccb66a30861b023ab496.diff LO

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:507-511 + // FIXME: Use a return value from EvalFn instead of isDifferent. + // Some functions should not change state and not have any other + // (invalidation, including errno) ef

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 486291. dgoldman marked 4 inline comments as done. dgoldman added a comment. Update comment + test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139458/new/ https://reviews.llvm.org/D139458 Files: clang-too

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/strlen-string-cstr.cpp:1 +// RUN: %check_clang_tidy -check-suffix=0 %s readability-strlen-string-cstr %t -- -config="{CheckOptions: [{key: readability-strlen-string-cstr.En

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StrlenStringCStrCheck.h:23 + : ClangTidyCheck(Name, Context), +EnableForDataMethod(Options.get("EnableForDataMethod", false)) {} + The docs say this is "true" b

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

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1367 + if (E->getBody()->isDependentContext()) { +Sema::SFINAETrap Trap(SemaRef); +// We recreate the RequiresExpr body, but no

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:838 + Result += getArgDesc(ArgN); + Result += DK == Violation ? " should not be zero" : " is not zero"; + return Result.c_str(); Szelethus wrote: > bal

[PATCH] D140992: clang: Add __builtin_elementsize_fma

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: fhahn, junaire, bob80905, python3kgae, RKSimon, aaron.ballman, erichkeane, scanon. Herald added a project: All. arsenm requested review of this revision. Herald added a subscriber: wdng. I didn't understand why the other builtins have promotio

  1   2   >