[PATCH] D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

2022-07-22 Thread Danny Mösch via Phabricator via cfe-commits
SimplyDanny updated this revision to Diff 446718. SimplyDanny added a comment. Fixed formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129973/new/ https://reviews.llvm.org/D129973 Files:

[PATCH] D130279: [clang-doc] Add check for pointer validity

2022-07-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130279/new/ https://reviews.llvm.org/D130279

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2022-07-22 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 446726. pmatos added a comment. Update the patch as there were some missing calls from SemaChecking. Thanks to @asb for spotting it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/

[PATCH] D130160: [pseudo] Eliminate the dangling-else syntax ambiguity.

2022-07-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 446728. hokein added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130160/new/ https://reviews.llvm.org/D130160 Files: clang-tools-extra/pseudo/include/clang-pseudo/Language.h

[PATCH] D117977: [cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore

2022-07-22 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. I think this commit broke our standalone builds: CMake Error at utils/hmaptool/CMakeLists.txt:1 (install): install PROGRAMS given no DESTINATION! Was the LLVM_TOOLS_INSTALL_DIR in this file supposed to be changed to CLANG_TOOLS_INSTALL_DIR ? Repository: rG LLVM

[PATCH] D130259: [clangd] fix crash and handle implicit conversions in inlay hints for forwarding functions

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. sorry for not mentioning in the bug that i was also working on a patch, D130260 seems to be a little bit more contained and focused on making the check not crash (as we're getting close to release cut). WDYT about landing it now,

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-22 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. In D130273#3670623 , @MaskRay wrote: > I notice that in gcc, -march/-mtune/-mcpu are handled in gcc/config/* and > every port may have somewhat different behaviors. E.g. x86 and aarch64 are > different (and I suspect x86 has the

[PATCH] D130066: [pseudo] Key guards by RuleID, add guards to literals (and 0).

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D130066#3670745 , @amyk wrote: > Hi! > > It appears that this patch is causing a build failure on a couple PPC bots > that build with shared libraries: > https://lab.llvm.org/buildbot/#/builders/57/builds/20179 >

[PATCH] D126731: [pseudo] Eliminate dependencies from clang-pseudo-gen. NFC

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D126731#3670265 , @vsapsai wrote: > Looks like this breaks a modular build. I.e., > > My understanding is that the module 'Clang_Basic' needs .inc headers and this > module is pulled in by `#include

[clang-tools-extra] 18cee95 - [pseudo] Tweak the cli option messages, NFC.

2022-07-22 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-07-22T08:53:24+02:00 New Revision: 18cee95919c8a9bf1a2d1c23fbbc7dc63077ee86 URL: https://github.com/llvm/llvm-project/commit/18cee95919c8a9bf1a2d1c23fbbc7dc63077ee86 DIFF: https://github.com/llvm/llvm-project/commit/18cee95919c8a9bf1a2d1c23fbbc7dc63077ee86.diff

[clang] 6d9b847 - [C++20] [Modules] Handle reachability for partial specialization

2022-07-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-07-22T17:03:38+08:00 New Revision: 6d9b84797c1c4bd00a2392043e9feea4ecebe482 URL: https://github.com/llvm/llvm-project/commit/6d9b84797c1c4bd00a2392043e9feea4ecebe482 DIFF: https://github.com/llvm/llvm-project/commit/6d9b84797c1c4bd00a2392043e9feea4ecebe482.diff

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-22 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 446727. skc7 edited the summary of this revision. skc7 added a comment. Rebase. Remove skipping noundef attribute based on maybe_undef. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files:

[clang-tools-extra] 2a88fb2 - [pseudo] Eliminate the dangling-else syntax ambiguity.

2022-07-22 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-07-22T09:13:09+02:00 New Revision: 2a88fb2ecb72300bfbbc74c586fb415cc18c9f9d URL: https://github.com/llvm/llvm-project/commit/2a88fb2ecb72300bfbbc74c586fb415cc18c9f9d DIFF: https://github.com/llvm/llvm-project/commit/2a88fb2ecb72300bfbbc74c586fb415cc18c9f9d.diff

[PATCH] D130160: [pseudo] Eliminate the dangling-else syntax ambiguity.

2022-07-22 Thread Haojian Wu 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 rG2a88fb2ecb72: [pseudo] Eliminate the dangling-else syntax ambiguity. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130259: [clangd] fix crash and handle implicit conversions in inlay hints for forwarding functions

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D130259#3671022 , @nridge wrote: > Which bug/issue is this? https://github.com/llvm/llvm-project/issues/56620 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130259/new/

[clang-tools-extra] d26ee28 - [pseudo] Fix link error after 3132e9cd7c9fda63

2022-07-22 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-07-22T08:43:56+02:00 New Revision: d26ee284ded30aff46a00986b5c966238e2279be URL: https://github.com/llvm/llvm-project/commit/d26ee284ded30aff46a00986b5c966238e2279be DIFF: https://github.com/llvm/llvm-project/commit/d26ee284ded30aff46a00986b5c966238e2279be.diff

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/constrained-special-member-functions.cpp:103 +// FIXME: DR1734. +static_assert(__is_trivially_copyable(CopyAssignmentChecker<1>)); +static_assert(!__is_trivially_copyable(CopyAssignmentChecker<2>));

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-22 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 446736. SixWeining added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130255/new/ https://reviews.llvm.org/D130255 Files: clang/lib/Basic/CMakeLists.txt clang/lib/Basic/Targets.cpp

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-22 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaCXX/constrained-special-member-functions.cpp:103 +// FIXME: DR1734. +static_assert(__is_trivially_copyable(CopyAssignmentChecker<1>)); +static_assert(!__is_trivially_copyable(CopyAssignmentChecker<2>));

[PATCH] D130259: [clangd] fix crash and handle implicit conversions in inlay hints for forwarding functions

2022-07-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D130259#3671009 , @kadircet wrote: > sorry for not mentioning in the bug that i was also working on a patch, Which bug/issue is this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] d9d554a - [pseudo] Add ambiguity & unparseability metrics to -print-statistics

2022-07-22 Thread Utkarsh Saxena via cfe-commits
Author: Sam McCall Date: 2022-07-22T10:35:06+02:00 New Revision: d9d554a3f4640e8f1ed5c0ae408740861715b897 URL: https://github.com/llvm/llvm-project/commit/d9d554a3f4640e8f1ed5c0ae408740861715b897 DIFF: https://github.com/llvm/llvm-project/commit/d9d554a3f4640e8f1ed5c0ae408740861715b897.diff

[PATCH] D130199: [pseudo] Add ambiguity & unparseability metrics to -print-statistics

2022-07-22 Thread Utkarsh Saxena 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 rGd9d554a3f464: [pseudo] Add ambiguity unparseability metrics to -print-statistics (authored by sammccall, committed by

[PATCH] D130199: [pseudo] Add ambiguity & unparseability metrics to -print-statistics

2022-07-22 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. Landed the patch. Will extract this as a library to share this with other continuous evaluation pipeline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130199/new/ https://reviews.llvm.org/D130199

[PATCH] D130254: [CMake][Clang] Copy folder without permissions

2022-07-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. What about similar code in LLVM ? Comment at: clang/cmake/modules/CMakeLists.txt:35 # via CMAKE_MODULE_PATH, place API

[clang] 70257fa - Use any_of (NFC)

2022-07-22 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-07-22T01:05:17-07:00 New Revision: 70257fab68e8081f5a4f182ea580f284b593aa6f URL: https://github.com/llvm/llvm-project/commit/70257fab68e8081f5a4f182ea580f284b593aa6f DIFF: https://github.com/llvm/llvm-project/commit/70257fab68e8081f5a4f182ea580f284b593aa6f.diff

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-22 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4415-4430 -// Upgrade branch protection and return address signing module flags. The -// module flag behavior for these fields were Error and now they are Min. -if (ID->getString() ==

[clang] afda39a - re-land [C++20][Modules] Build module static initializers per P1874R1.

2022-07-22 Thread Iain Sandoe via cfe-commits
Author: Iain Sandoe Date: 2022-07-22T08:38:07+01:00 New Revision: afda39a566d9b076bbcbeac1a6a1d4f6aecb3274 URL: https://github.com/llvm/llvm-project/commit/afda39a566d9b076bbcbeac1a6a1d4f6aecb3274 DIFF: https://github.com/llvm/llvm-project/commit/afda39a566d9b076bbcbeac1a6a1d4f6aecb3274.diff

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-07-22 Thread Iain Sandoe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGafda39a566d9: re-land [C++20][Modules] Build module static initializers per P1874R1. (authored by iains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D90275: [clang][IR] Add support for leaf attribute

2022-07-22 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added a comment. Herald added a subscriber: ormris. Herald added a project: All. Could you please add a description of this attribute to LangRef? We need the semantics of this. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130254: [CMake][Clang] Copy folder without permissions

2022-07-22 Thread Sebastian Neubauer 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 rGf359eac5df06: [CMake][Clang] Copy folder without permissions (authored by sebastian-ne). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] f359eac - [CMake][Clang] Copy folder without permissions

2022-07-22 Thread Sebastian Neubauer via cfe-commits
Author: Sebastian Neubauer Date: 2022-07-22T10:38:54+02:00 New Revision: f359eac5df06c1062019fad9aac41f4320899c5f URL: https://github.com/llvm/llvm-project/commit/f359eac5df06c1062019fad9aac41f4320899c5f DIFF:

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-22 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. Okay, thanks for the update. LGTM! Comment at: clang/test/Analysis/wstring.c:385 + wchar_t a[32]; + // FIXME: This should work with

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:899 + // triviality properties of the class until selecting a destructor and + // computing the eligibility of SMFs. This is because those member + // functions may have constraints that we need

[clang] 1a3a2ee - [NFC] Move function definition to cpp file

2022-07-22 Thread Jun Zhang via cfe-commits
Author: Jun Zhang Date: 2022-07-23T13:43:42+08:00 New Revision: 1a3a2eec717b6067e29d8a07318257d2d96da238 URL: https://github.com/llvm/llvm-project/commit/1a3a2eec717b6067e29d8a07318257d2d96da238 DIFF: https://github.com/llvm/llvm-project/commit/1a3a2eec717b6067e29d8a07318257d2d96da238.diff

[PATCH] D130299: [clang-format] FIX: Misformatting lambdas with trailing return type 'auto' in braced lists

2022-07-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. In D130299#3672486 , @denis-fatkulin wrote: >> Could you please add full git context? > > I updated the patch with

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. driveby thoughts, but please don't block on them. (if this fix is a heuristic that fixes a common crash but isn't completely correct, that may still be worth landing but warrants a fixme) Comment at: clang-tools-extra/clangd/AST.cpp:832

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:832 continue; +// Check that this expands all the way until the last parameter. +auto ParamEnd = It + Parameters.size() - 1; sammccall wrote: > The essence of

[clang-tools-extra] 934d603 - [clang-tidy][NFC] Add preposition "of" to code annotation of ElseAfterReturnCheck

2022-07-22 Thread Nathan James via cfe-commits
Author: Zhouyi Zhou Date: 2022-07-22T12:40:08+01:00 New Revision: 934d60382673f0e70dea41406d1f900d3833e4b3 URL: https://github.com/llvm/llvm-project/commit/934d60382673f0e70dea41406d1f900d3833e4b3 DIFF: https://github.com/llvm/llvm-project/commit/934d60382673f0e70dea41406d1f900d3833e4b3.diff

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

2022-07-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG934d60382673: [clang-tidy][NFC] Add preposition of to code annotation of… (authored by zhouyizhou, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Implementation choices here: - we walk through the whole tree everytime we see decl-specifier-seq: this is dumb but we to reuse work we either need to add extra rules to the grammar (D130150 ) or an explicit cache. Caching is likely

[PATCH] D130268: [WIP] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 updated this revision to Diff 446773. yurai007 edited the summary of this revision. yurai007 added a comment. Update constructor definition with explicit to avoid implicit conversions and remove ambiguity workarounds. Adjust constructor users and add unit tests. Repository: rG LLVM

[PATCH] D130268: [WIP] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 marked an inline comment as done. yurai007 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); +

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D130337#3671159 , @sammccall wrote: > FWIW, as-is with no caching, this is a ~2% slowdown on my machine (5.82 -> > 5.72 MB/s on SemaCodeComplete.cpp). > Whereas D130150 using the grammar

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 446796. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130260/new/ https://reviews.llvm.org/D130260 Files:

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D130260#3671290 , @sammccall wrote: > driveby thoughts, but please don't block on them. > > (if this fix is a heuristic that fixes a common crash but isn't completely > correct, that may still be worth landing but warrants a

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks, the change looks good in general. > we handle *all* rules for the interesting node types explicitly, rather than > default: return false. This allows us to assert that all cases are handled, > so things don't "fall through the cracks" after grammar changes.

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D130260#3671494 , @kadircet wrote: > In D130260#3671290 , @sammccall > wrote: > >> driveby thoughts, but please don't block on them. >> >> (if this fix is a heuristic that fixes a

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/pseudo/lib/cxx/cxx.bnf:353 decl-specifier-seq := decl-specifier -decl-specifier-seq := decl-specifier decl-specifier-seq +decl-specifier-seq := decl-specifier

[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an E numDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:18886 + InitVal.getActiveBits() ? InitVal.getActiveBits() : 1; + NumPositiveBits = std::max(NumPositiveBits, ActiveBits); +} else What about: `std::max({NumPositiveBits,

[clang] 35b80c4 - Don't write to source directory in test

2022-07-22 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2022-07-22T11:14:26+02:00 New Revision: 35b80c448bbc056a7060201c9f62eec9115e3c31 URL: https://github.com/llvm/llvm-project/commit/35b80c448bbc056a7060201c9f62eec9115e3c31 DIFF:

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-07-22 Thread Nathan James via Phabricator via cfe-commits
njames93 closed this revision. njames93 added a comment. In D120185#3668029 , @mgorny wrote: > This change broke standalone build of clang. Please fix. I've pushed rG251b5b864183e868ffc86522e320f91ab3c5a771

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 446763. kadircet added a comment. - Add OOB check as an asssertion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130260/new/ https://reviews.llvm.org/D130260 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 446769. kadircet marked an inline comment as done. kadircet added a comment. - Rather than asserting limit the traversal - Have more comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130260/new/

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. Drop WIP tag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130268/new/ https://reviews.llvm.org/D130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:828 // find the argument directly referring to the first parameter -for (auto It = Args.begin(); It != Args.end(); ++It) { - const Expr *Arg = *It; - if (const auto *RefArg =

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:832 continue; +// Check that this expands all the way until the last parameter. +auto ParamEnd = It + Parameters.size() - 1; upsj wrote: > sammccall wrote: >

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/test/Analysis/wstring.c:385 + wchar_t a[32]; + // FIXME: This should work with 'w_str' instead of 'w_str1' + const wchar_t w_str1[] = L"Hello world"; martong wrote: > balazske wrote: > > The problem may be

[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

2022-07-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. So this is perhaps the 'most acceptable' version of this workaround or me. What do you think @aaron.ballman and @tahonermann ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130331/new/ https://reviews.llvm.org/D130331

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added a comment. In D130337#3671559 , @hokein wrote: > Thanks, the change looks good in general. > >> we handle *all* rules for the interesting node types explicitly, rather than >> default: return

[PATCH] D130259: [clangd] fix crash and handle implicit conversions in inlay hints for forwarding functions

2022-07-22 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj abandoned this revision. upsj added a comment. Superseded by https://reviews.llvm.org/D130260 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130259/new/ https://reviews.llvm.org/D130259 ___

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 446753. sammccall added a comment. use all_of Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130337/new/ https://reviews.llvm.org/D130337 Files: clang-tools-extra/pseudo/lib/cxx/CXX.cpp

[PATCH] D130338: [CMake] Copy folder without permissions

2022-07-22 Thread Sebastian Neubauer via Phabricator via cfe-commits
sebastian-ne created this revision. sebastian-ne added reviewers: awarzynski, Ericson2314, tstellar. Herald added subscribers: bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester,

[clang] 251b5b8 - [ASTMatchers] Fix standalone build

2022-07-22 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-07-22T10:32:49+01:00 New Revision: 251b5b864183e868ffc86522e320f91ab3c5a771 URL: https://github.com/llvm/llvm-project/commit/251b5b864183e868ffc86522e320f91ab3c5a771 DIFF: https://github.com/llvm/llvm-project/commit/251b5b864183e868ffc86522e320f91ab3c5a771.diff

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:790 +// Skip functions with less parameters, they can't be the target. +if (Callee->parameters().size() < Parameters.size()) + return; upsj wrote: > This is not a

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj accepted this revision. upsj added a comment. This revision is now accepted and ready to land. Not sure I qualify as a suitable reviewer, but this looks really good to me, save for maybe a small safety measure :) Comment at: clang-tools-extra/clangd/AST.cpp:833-837 +

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:833 +// Check that this expands all the way until the last parameter. +auto ParamEnd = It + Parameters.size() - 1; +assert(std::distance(Args.begin(), ParamEnd) <

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 446770. kadircet added a comment. - Update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130260/new/ https://reviews.llvm.org/D130260 Files: clang-tools-extra/clangd/AST.cpp

[clang-tools-extra] 4839929 - [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2022-07-22T14:37:13+02:00 New Revision: 4839929bed6e69346ff689ffe88750a90ebc0dfa URL: https://github.com/llvm/llvm-project/commit/4839929bed6e69346ff689ffe88750a90ebc0dfa DIFF:

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4839929bed6e: [clangd] Make forwarding parameter detection logic resilient (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D130260?vs=446796=446805#toc Repository: rG LLVM

[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-07-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129048#3670212 , @ldionne wrote: > The libc++ CI runs pre-commit only, and it runs on all commits that touch > something under `libcxx/`, `libcxxabi/`, `runtimes/` and `libunwind/`. In > particular, it won't trigger

[PATCH] D130066: [pseudo] Key guards by RuleID, add guards to literals (and 0).

2022-07-22 Thread Amy Kwan via Phabricator via cfe-commits
amyk added a comment. In D130066#3670875 , @sammccall wrote: > In D130066#3670745 , @amyk wrote: > >> Hi! >> >> It appears that this patch is causing a build failure on a couple PPC bots >> that build with

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Tobias Ribizel via Phabricator via cfe-commits
upsj added a comment. Your approach to handling implicit conversions is much nicer than mine, so I abandoned my revision. There is still one case (that might even occur in the code base I'm working on?) that this change would lead to incorrect hints on. WDYT about keeping the other changes,

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: usaxena95, kadircet. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999, ilya-biryukov. Herald added a project:

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. FWIW, as-is with no caching, this is a ~2% slowdown on my machine (5.82 -> 5.72 MB/s on SemaCodeComplete.cpp). Whereas D130150 using the grammar is a a 7% speedup (5.82 -> 6.22), so roughly an 9% performance difference between the

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 446759. kadircet added a comment. - Check to ensure function call receives all the arguments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130260/new/ https://reviews.llvm.org/D130260 Files:

[PATCH] D130260: [clangd] Make forwarding parameter detection logic resilient

2022-07-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. LGTM Comment at: clang-tools-extra/clangd/AST.cpp:830 +assert(Parameters.size() <= + static_cast(std::distance(Args.begin(), Args.end(; +for (auto Begin = Args.begin(), End = Args.end()

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. LMK if anything else blocking here. I want to take a stab at changing the enums (cool idea), but I don't think there's much point blocking this patch on it. Better to use it as a testbed for the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129654: [Clang][Driver] Fix include paths for `--sysroot /` on OpenBSD/FreeBSD

2022-07-22 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan added a comment. Thanks @brad @3405691582 @MaskRay for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129654/new/ https://reviews.llvm.org/D129654 ___ cfe-commits mailing list

[PATCH] D129654: [Clang][Driver] Fix include paths for `--sysroot /` on OpenBSD/FreeBSD

2022-07-22 Thread Egor Zhdan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d0cc510516d: [Clang][Driver] Fix include paths for `--sysroot /` on OpenBSD/FreeBSD (authored by egorzhdan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards

2022-07-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The change looks good to me. In D130337#3671575 , @sammccall wrote: > LMK if anything else blocking here. I don't want to block you, but I'd suggest postponing it a little bit until we collect some metrics in our internal

[PATCH] D128927: [libc++] Always build c++experimental.a

2022-07-22 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. >> In https://github.com/llvm/llvm-zorg/pull/28 you mentioned that "for a >> couple of years now, Clang and libc++ are entirely separate projects w.r.t. >> how they are shipped on Apple platforms, and it doesn't make sense to build >> libc++ at the same time as Clang

[PATCH] D127284: [WIP] [clang-repl] Support statements on global scope in incremental mode.

2022-07-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 446817. v.g.vassilev added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127284/new/ https://reviews.llvm.org/D127284 Files: clang/include/clang/AST/ASTConsumer.h clang/include/clang/Parse/Parser.h

[PATCH] D125946: Handles failing driver tests of clang

2022-07-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125946/new/ https://reviews.llvm.org/D125946 ___ cfe-commits mailing list

[PATCH] D130270: [clang][dataflow] Use a dedicated bool to encode which branch was taken

2022-07-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/DataflowAnalysisContextTest.cpp:439 Context.addFlowConditionConstraint(FC2, Y); - // JoinedFC = (FC1 || FC2) && Z = (X || Y) && Z - auto = Context.joinFlowConditions(FC1, FC2); + //

[PATCH] D117977: [cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore

2022-07-22 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. Will make patch forit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117977/new/ https://reviews.llvm.org/D117977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130306: [clang][dataflow] Analyze calls to in-TU functions

2022-07-22 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 446830. samestep added a comment. Update parent patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130306/new/ https://reviews.llvm.org/D130306 Files:

[PATCH] D129640: [clang][ASTImporter] Improved handling of functions with auto return type.

2022-07-22 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/AST/ASTImporter.cpp:3237 + ParentMapContext = DC->getParentASTContext().getParentMapContext(); + DynTypedNodeList P = ParentC.getParents(*S);

[PATCH] D129872: [clang][OpenMP] Fix runtime crash in the call to __kmp_alloc.

2022-07-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Why does it get truncated if the type must be integer? Probably, something incorrect in sema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129872/new/ https://reviews.llvm.org/D129872

[PATCH] D130306: [clang][dataflow] Analyze calls to in-TU functions

2022-07-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:220 + assert(Body != nullptr); + initGlobalVars(*Body, Env); + ymandel wrote: > samestep wrote: > > ymandel wrote: > > > I wonder how this will work between

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); + CGM.getLLVMContext(), Packed ?

[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-07-22 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added a comment. In D129048#3671568 , @aaron.ballman wrote: > In D129048#3670212 , @ldionne wrote: > >> The libc++ CI runs pre-commit only, and it runs on all commits that touch >> something under

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ https://reviews.llvm.org/D118996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 1d0cc51 - [Clang][Driver] Fix include paths for `--sysroot /` on OpenBSD/FreeBSD

2022-07-22 Thread Egor Zhdan via cfe-commits
Author: Egor Zhdan Date: 2022-07-22T14:30:32+01:00 New Revision: 1d0cc510516d50c459f78896a0375fadb13a2b45 URL: https://github.com/llvm/llvm-project/commit/1d0cc510516d50c459f78896a0375fadb13a2b45 DIFF: https://github.com/llvm/llvm-project/commit/1d0cc510516d50c459f78896a0375fadb13a2b45.diff

[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-07-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D129048#3671657 , @ldionne wrote: > In D129048#3671568 , @aaron.ballman > wrote: > >> FWIW, I've convinced myself that I agree with you here that the burden >> probably should

[PATCH] D130305: [clang][dataflow] Refactor ApplyBuiltinTransfer field out into DataflowAnalysisOptions struct

2022-07-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:66 explicit DataflowAnalysis(ASTContext ) : Context(Context) {} explicit DataflowAnalysis(ASTContext , bool ApplyBuiltinTransfer) :

[PATCH] D130306: [clang][dataflow] Analyze calls to in-TU functions

2022-07-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added a comment. In D130306#3670259 , @xazax.hun wrote: > There are many ways to introduce context sensitivity into the framework, this > patch seems to take the "inline substitution" approach, the same approach the > Clang Static Analyzer is

[PATCH] D130306: [clang][dataflow] Analyze calls to in-TU functions

2022-07-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:208 + + // TODO: Currently this only works if the callee is never a method and the + // same callee is never analyzed from multiple separate callsites. To

[clang] aed1ab8 - [clang][dataflow] Refactor ApplyBuiltinTransfer field out into DataflowAnalysisOptions struct

2022-07-22 Thread Sam Estep via cfe-commits
Author: Sam Estep Date: 2022-07-22T15:16:29Z New Revision: aed1ab8cabac64b59338f5ebadd12a371cb2ee5d URL: https://github.com/llvm/llvm-project/commit/aed1ab8cabac64b59338f5ebadd12a371cb2ee5d DIFF: https://github.com/llvm/llvm-project/commit/aed1ab8cabac64b59338f5ebadd12a371cb2ee5d.diff LOG:

[PATCH] D130305: [clang][dataflow] Refactor ApplyBuiltinTransfer field out into DataflowAnalysisOptions struct

2022-07-22 Thread Sam Estep 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 rGaed1ab8cabac: [clang][dataflow] Refactor ApplyBuiltinTransfer field out into… (authored by samestep). Repository: rG LLVM Github Monorepo

[clang] effe799 - [CUDA] remove duplicate condition

2022-07-22 Thread Yaxun Liu via cfe-commits
Author: VitalyR Date: 2022-07-22T11:27:19-04:00 New Revision: effe79993f8e0bd13181fcf660a47ed7044a83c3 URL: https://github.com/llvm/llvm-project/commit/effe79993f8e0bd13181fcf660a47ed7044a83c3 DIFF: https://github.com/llvm/llvm-project/commit/effe79993f8e0bd13181fcf660a47ed7044a83c3.diff LOG:

  1   2   3   >