[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-13 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/include/clang/AST/ExprConcepts.h:103 + bool hasSubstitutionFailureInArgs() const { +return ArgsHasSubstitutionFailure; erichkeane wrote: > Does this really belong here instead of as a part of the > Concep

[PATCH] D137712: Correctly handle Substitution failure in concept specialization.

2022-11-13 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 475054. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Addressed commented. Added Release notes. Removed infrastructure changes and deferred them to a future patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-11-13 Thread Guillot Tony via Phabricator via cfe-commits
to268 marked 7 inline comments as done. to268 added a comment. This is a status update of the patch. Comment at: clang/lib/Parse/ParseExpr.cpp:1526 +// This is a temporary fix while we don't support C2x 6.5.2.5p4 +if (getLangOpts().C2x && GetLookAheadToken(2).getKind()

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-13 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n marked 2 inline comments as done. goldstein.w.n added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:69 (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth; - Indent = Line.Level * IndentWidth + AdditionalIn

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-13 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added a comment. In D137181#3923921 , @owenpan wrote: > I think we are close to the finishing line. Can you revisit the change to the > formatter and clean it up? For example, casting `PPLevel` to `unsigned` is > redundant now. IMO you can

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-13 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n updated this revision to Diff 475050. goldstein.w.n added a comment. 1. Updating D137181 : [clang-format] Don't use 'PPIndentWidth' inside multi-line macros # 2. Enter a brief description of the changes included in this update. 3. The first line i

[clang] 360c5fe - [C++20] [Modules] Emit Macro Definition in -module-file-info action

2022-11-13 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-11-14T13:28:26+08:00 New Revision: 360c5fe54c0758c73bf85453fd2913f371adc7d5 URL: https://github.com/llvm/llvm-project/commit/360c5fe54c0758c73bf85453fd2913f371adc7d5 DIFF: https://github.com/llvm/llvm-project/commit/360c5fe54c0758c73bf85453fd2913f371adc7d5.diff LO

[PATCH] D137570: [Clang][Sema] Refactor category declaration under CheckForIncompatibleAttributes. NFC

2022-11-13 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 475044. eopXD added a comment. Minor update in comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137570/new/ https://reviews.llvm.org/D137570 Files: clang/lib/Sema/SemaStmtAttr.cpp Index: clang/lib/Sem

[PATCH] D137570: [Clang][Sema] Refactor category declaration under CheckForIncompatibleAttributes. NFC

2022-11-13 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 475043. eopXD marked 3 inline comments as done. eopXD added a comment. Address comments from reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137570/new/ https://reviews.llvm.org/D137570 Files: clang/l

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. I think we are close to the finishing line. Can you revisit the change to the formatter and clean it up? For example, casting `PPLevel` to `unsigned` is redundant now. IMO you can simply the change too. Comment at: clang/lib/Format/UnwrappedLineFormat

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think improving diagnostic is useful but `-fsanitize=` is probably not a good place. Instrumenting call sites with `callq __ubsan_handle_exception_escape@PLT` wastes code size. The functionality is better handled somewhere in libc++abi personality related code with

[PATCH] D137901: [Clang] `nothrow`-implying attributes should actually manifest `nothrow` attribute (PR58798)

2022-11-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think improving diagnostic is useful but `-fsanitize=` is probably not a good place. Instrumenting call sites with `callq __ubsan_handle_exception_escape@PLT` wastes code size. The functionality is better handled somewhere in libc++abi personality related code with

[PATCH] D137787: [CodeGen] Relax assertion on generating destructor call

2022-11-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137787#3923540 , @Hahnfeld wrote: >> Is it the reproducer? > > No, as I wrote: > >> Sadly this works fine in standalone Clang... Sorry, I don't understand well. Could you rewrite the reproducer in the style I wrote? And in

[PATCH] D137865: [clang-format][NFC] Improve documentation on ReflowComments

2022-11-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/include/clang/Format/Format.h:3864 /// \endcode + /// This option has only effect if ``ReflowComments`` is set to ``true``. /// \version 13 owenpan wrote: > We need an empty line after `/// \endcode`. > We n

[PATCH] D137865: [clang-format][NFC] Improve documentation on ReflowComments

2022-11-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/include/clang/Format/Format.h:3073-3076 + /// If ``true``, clang-format will attempt to re-flow comments. That is it + /// will touch a comment and *reflow* long comments into new lines, trying to + /// obey the ``ColumnLimit``.

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-13 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe updated this revision to Diff 475030. Febbe marked 5 inline comments as done. Febbe added a comment. Fixed a lot of false positives: - no move for no automatic storage duration - no move for lambda captures Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D137920: [nfc] Mark classes final as reported by -Wsuggest-final-types

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. See https://github.com/llvm/llvm-project/issues/57525. The change is focused on those cases reported by gcc, i.e. with actual devirtualization potential. It needs to be carefully checked if some of those shouldn't be final (and could we somehow mark those as intended for

[PATCH] D137920: [nfc] Mark classes final as reported by -Wsuggest-final-types

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r created this revision. Herald added subscribers: steakhal, pmatos, asb, abrachet, frasercrmck, ThomasRaoux, martong, phosek, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, mstorsjo, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, ni

[PATCH] D137919: [clangd] use fine-grained code action kinds

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. RFC. First described in https://github.com/clangd/clangd/issues/1326. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137919/new/ https://reviews.llvm.org/D137919 ___ cfe-commits m

[PATCH] D137919: [clangd] use fine-grained code action kinds

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. Trass3r requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo http

[PATCH] D137917: [cmake] Fix _GNU_SOURCE being added unconditionally

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r created this revision. Herald added a project: All. Trass3r requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D137917 Files: clang/CMakeLists.txt l

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:348 +"code-lens", cat(Features), desc("Enable preview of CodeLens feature"), +init(true), Hidden, +}; I guess we should rather make it opt-in and gather some feedback

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 475017. aeubanks added a comment. I somehow missed the previous comments rebased on top of fixing UB in tests changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133036/new/ https://reviews.llvm.org/D133036

[clang] e564f51 - [clang][test] Avoid UB in overload.cl

2022-11-13 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-13T14:02:24-08:00 New Revision: e564f5153f91ef40a406c7f907877ceafb6da39d URL: https://github.com/llvm/llvm-project/commit/e564f5153f91ef40a406c7f907877ceafb6da39d DIFF: https://github.com/llvm/llvm-project/commit/e564f5153f91ef40a406c7f907877ceafb6da39d.diff

[PATCH] D137851: [OPENMP]Initial support for at clause

2022-11-13 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 475013. jyu2 added a comment. try fix format again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137851/new/ https://reviews.llvm.org/D137851 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 ___ cfe-commits mailing list c

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-13 Thread Tim Neumann via Phabricator via cfe-commits
TimNN added a comment. I'm sorry for the noise. Further investigation has shown that this happens when Rust is doing (thin) LTO, and I don't think this patch can be considered in any way "at fault" here, so this is the last you'll hear from me on the topic here. I don't know whether the fault i

[PATCH] D137753: [Clang][GNU][AIX][p]Enable -p Functionality

2022-11-13 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 475009. francii added a comment. Updated Linux test case Added profiled library search for AIX. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137753/new/ https://reviews.llvm.org/D137753 Files: clang/include

[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries

2022-11-13 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 475007. francii added a comment. Soft reset Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137375/new/ https://reviews.llvm.org/D137375 Files: clang/lib/Driver/ToolChains/AIX.cpp Index: clang/lib/Driver/Too

[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries

2022-11-13 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 475006. francii added a comment. Removed unnecessary variables Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137375/new/ https://reviews.llvm.org/D137375 Files: clang/lib/Driver/ToolChains/AIX.cpp Index: c

[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries

2022-11-13 Thread Michael Francis via Phabricator via cfe-commits
francii updated this revision to Diff 475005. francii added a comment. Add support for `--sysroot` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137375/new/ https://reviews.llvm.org/D137375 Files: clang/lib/Driver/ToolChains/AIX.cpp Index: cla

[PATCH] D137714: Do not merge traps in functions annotated optnone

2022-11-13 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. Other than minor issue in the test this LGTM Comment at: clang/test/CodeGen/ubsan-trap-debugloc.c:11 +void bar(volatile int a) __attribute__((optnone)) { + // CHECK: call void @llvm.ubsantrap(i8 0){{.*}} !dbg [[LOC2:![0-9]+]] + // CHECK: call void @

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-13 Thread Aaron Gokaslan via Phabricator via cfe-commits
Skylion007 added a comment. The main false positive I also keep seeing is in pybind11 where it suggests call an std::move() for an implicit conversion, but the target of the implicit conversion does not have an rvalue. (In this case, we have a py::object which inherits from py::handle, and is j

[PATCH] D137762: [clang-format] avoid breaking )( with BlockIndent

2022-11-13 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:5006-5010 +return !((Previous && (Previous->is(tok::kw_for) || Previous->isIf())) || + (Right.Next && + (Right.Next->is(tok::l_paren) || + (Right.N

[PATCH] D137787: [CodeGen] Relax assertion on generating destructor call

2022-11-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. > Is it the reproducer? No, as I wrote: > Sadly this works fine in standalone Clang... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137787/new/ https://reviews.llvm.org/D137787 _

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-13 Thread Paul Eggert via cfe-commits
On 2022-11-11 07:11, Aaron Ballman wrote: Clang doesn't require such a linker (we work with various system linkers). As long as the system linkers continue to work as they have traditionally worked, we're fine. the frontend perspective, we can't tell the difference between "trust me this is

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-13 Thread Paul Eggert via cfe-commits
On 2022-11-11 07:11, Aaron Ballman wrote: We believe the runtime behavior is sufficiently dangerous to warrant a conservative view that any call to a function will be a call that gets executed at runtime, hence a definitive signature mismatch is something we feel comfortable diagnosing (in some f

[PATCH] D137787: [CodeGen] Relax assertion on generating destructor call

2022-11-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137787#3921673 , @Hahnfeld wrote: > I've trimmed the failing code down to > > #include > #include > #include > > template > struct SO { > void a() { > struct SI { > std::vector v; > }

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474990. tom-anders added a comment. Clean up test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-tools-

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-13 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-on-last-use.rst:50 + + A string specifying which include-style is used, `llvm` or `google`. Default + is `llvm`. Febbe wrote: > Eugene.Zelenko w

[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

2022-11-13 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe added a comment. In D137205#3920016 , @firewave wrote: > Getting this false positive: > > #include > > extern std::string str() > { > std::string ret; > return ret.empty() ? ret : ret.substr(1); > } > > > > input.cpp:6:23:

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-13 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added a comment. In D137181#3923434 , @owenpan wrote: > In D137181#3918715 , @goldstein.w.n > wrote: > >> In D137181#3918673 , @owenpan >> wrote: >> >>> Be

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

2022-11-13 Thread Liming Liu via Phabricator via cfe-commits
lime updated this revision to Diff 474987. lime retitled this revision from "[clang] Add the check of decltype in derived templates for issue #58674" to "[clang] Add the check of membership in decltype for the issue #58674". lime added a comment. Herald added a subscriber: yaxunl. Remove an if-s

[PATCH] D137897: Extend the number of case Sema::CheckForIntOverflow covers

2022-11-13 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. It looks like `conditional_callbacks.c` has been failing every once and while before this change. I can't seem to track down when it started yet. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137897/new/ https://reviews.llvm.org/D137897

[PATCH] D137697: Move the isSelfContained function from clangd to libtooling.

2022-11-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. nit: isSelfContained/isSelfContainedHeader in commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137697/new/ https://reviews.llvm.org/D137697 ___ cfe-commits mailing lis