[clang] 4f37de9 - [clang-format][doc] Fix a typo

2023-02-03 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-02-03T00:24:54-08:00 New Revision: 4f37de9c91eb0674c3f218c5b585780bd7072593 URL: https://github.com/llvm/llvm-project/commit/4f37de9c91eb0674c3f218c5b585780bd7072593 DIFF: https://github.com/llvm/llvm-project/commit/4f37de9c91eb0674c3f218c5b585780bd7072593.diff LOG:

[PATCH] D79378: PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz.

2023-02-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D79378#4101613 , @shiva0217 wrote: > Hi, > > I have a question for the delete function call sinking in -Oz. > > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3690.pdf. > According to 3.7.4.2/3 > ` The value of the f

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2023-02-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Friendly ping. I realized @aaron.ballman you probably have very good insights into this use case, since (AFAICT) you wrote a guideline about anonymous namespaces in headers, which is very closely related to this: https://wiki.sei.cmu.edu/confluence/display/cplusplu

[PATCH] D137070: [clang][Interp] Support destructors

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1915-1916 + +if (const CXXDestructorDecl *Dtor = ElemRecord->getDestructor(); +Dtor && !Dtor->isTrivial()) { + for (size_t I = 0, E = Des

[PATCH] D141591: [clang][Interp] Properly identify not-yet-defined functions

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/functions.cpp:158-174 +struct F { + constexpr bool ok() const { +return okRecurse(); + } + constexpr bool okRecurse() const { +return true; + } aaron.ballman wrote: > Should we have some

[PATCH] D79378: PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz.

2023-02-03 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 added a comment. In D79378#4101829 , @rjmccall wrote: > In D79378#4101613 , @shiva0217 wrote: > >> Hi, >> >> I have a question for the delete function call sinking in -Oz. >> >> https://www.open-std.org/jt

[clang] 450a461 - [Clang] Add builtin_nondeterministic_value

2023-02-03 Thread via cfe-commits
Author: ManuelJBrito Date: 2023-02-03T09:47:46Z New Revision: 450a4612c39cc150879a0f0e692adfc1d0d9 URL: https://github.com/llvm/llvm-project/commit/450a4612c39cc150879a0f0e692adfc1d0d9 DIFF: https://github.com/llvm/llvm-project/commit/450a4612c39cc150879a0f0e692adfc1d0d9.diff LOG:

[PATCH] D142388: [clang] Add builtin_nondeterministic_value

2023-02-03 Thread Manuel Brito 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 rG450a4612c39c: [Clang] Add builtin_nondeterministic_value (authored by ManuelJBrito). Changed prior to commit: https://reviews.llvm.org/D142388?vs=

[PATCH] D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:18 static llvm::StringRef *HeaderNames; +static struct SymbolName { nit: we group

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494573. hokein added a comment. refine the patch: include multiple-header symbols. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/ https://reviews.llvm.org/D143160 Files: clang/include/clang/Tooling

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D142384#4101461 , @ChuanqiXu wrote: > It should be good to prevent crashes. But it looks not good that it doesn't > have a test. Do you have plans to add a test case for this soon? It would be great to have a test, but

[PATCH] D143260: [clangd] Add semantic token for labels

2023-02-03 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. ckandeler added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. ckandeler requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-02-03 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:213 + char *res = strsep(s, delim); + s_label = dfsan_read_label(base, strlen(base)); + if (res && (res != base)) { tkuchta wrote: > browneee wrote: > > tkuchta wrote: > > > bro

[PATCH] D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

2023-02-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:18 static llvm::StringRef *HeaderNames; +static struct SymbolName { hokein wrote: > nit: we group five symbols toge

[clang] e1aaa31 - [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

2023-02-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-02-03T13:22:26+01:00 New Revision: e1aaa314a46cd303019da117bfd330611d5b7a84 URL: https://github.com/llvm/llvm-project/commit/e1aaa314a46cd303019da117bfd330611d5b7a84 DIFF: https://github.com/llvm/llvm-project/commit/e1aaa314a46cd303019da117bfd330611d5b7a84.diff LO

[PATCH] D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

2023-02-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rGe1aaa314a46c: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name() (authored by sammc

[PATCH] D143194: [clang][analyzer] Make messages of StdCLibraryFunctionsChecker user-friendly

2023-02-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: gamesh411. Szelethus added a comment. Awesome, been a long time coming!! Other than the minor observation of changing "of function" to "to", I'm inclined to accept this patch. We definitely should describe what the value IS, not just what is should be (aside from the

[clang] 506e55b - Revert unintended debug things :-(

2023-02-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-02-03T13:47:13+01:00 New Revision: 506e55b041b94808c80099d61cef5539390ab215 URL: https://github.com/llvm/llvm-project/commit/506e55b041b94808c80099d61cef5539390ab215 DIFF: https://github.com/llvm/llvm-project/commit/506e55b041b94808c80099d61cef5539390ab215.diff LO

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D143093#4099623 , @sammccall wrote: > I can't understand from the description, code, or testcases what problem this > is fixing. Can you clarify, ideally by improving the testcases? Yeah should've elaborated on this one. As

[PATCH] D141858: [clang][Interp] Fix Pointer::toAPValue() for expressions

2023-02-03 Thread Timm Bäder 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 rGf63138d44429: [clang][Interp] Fix Pointer::toAPValue() for expressions (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[clang] f63138d - [clang][Interp] Fix Pointer::toAPValue() for expressions

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T14:30:05+01:00 New Revision: f63138d44429fc04bd2d7477f2e492f180d7aab3 URL: https://github.com/llvm/llvm-project/commit/f63138d44429fc04bd2d7477f2e492f180d7aab3 DIFF: https://github.com/llvm/llvm-project/commit/f63138d44429fc04bd2d7477f2e492f180d7aab3.diff LO

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. @aaron.ballman @njames93 could you guys please take another look at this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, this looks good to me! This requires some work to rebase for https://github.com/llvm/llvm-project/commit/e1aaa314a46cd303019da117bfd330611d5b7a84, I will rebase it and land it for you

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

2023-02-03 Thread Sam Elliott via Phabricator via cfe-commits
lenary added a comment. In D140999#4030131 , @MaskRay wrote: > I don't think it is necessary to deprecate the old header then delete it > after 16.0.0 is branched. > llvm/Support/AArch64TargetParser.h has very few open-source out-of-tree uses. > Perhaps

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

2023-02-03 Thread Sam Elliott via Phabricator via cfe-commits
lenary retitled this revision from "[NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h" to "[NFC][TargetParser] Remove llvm/Support/AArch64TargetParser.h". lenary edited the summary of this revision. lenary updated this revision to Diff 494596. Repository: rG LLVM Github Monorepo

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

2023-02-03 Thread Sam Elliott via Phabricator via cfe-commits
lenary updated this revision to Diff 494600. 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/Targets/AArch64.h clang/lib/CodeGen/CGBuiltin.cp

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

2023-02-03 Thread Sam Elliott via Phabricator via cfe-commits
lenary added a comment. Most recent diff was to clang-format the patch, which has removed some duplicate includes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140999/new/ https://reviews.llvm.org/D140999

[PATCH] D143094: [clang] Change AMX macros to match names from GCC

2023-02-03 Thread Joe Loser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8998fa6c14f1: [clang] Change AMX macros to match names from GCC (authored by jloser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143094/new/ https://revi

[clang] 8998fa6 - [clang] Change AMX macros to match names from GCC

2023-02-03 Thread Joe Loser via cfe-commits
Author: Joe Loser Date: 2023-02-03T07:00:16-07:00 New Revision: 8998fa6c14f1e19957858aa0e4b592d62ae56041 URL: https://github.com/llvm/llvm-project/commit/8998fa6c14f1e19957858aa0e4b592d62ae56041 DIFF: https://github.com/llvm/llvm-project/commit/8998fa6c14f1e19957858aa0e4b592d62ae56041.diff LOG

[clang] 7bb615e - [clang][Interp] Materializing primitive temporaries

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T15:11:15+01:00 New Revision: 7bb615ea0ec015eb5991ddc00e0a3fc31cb2735e URL: https://github.com/llvm/llvm-project/commit/7bb615ea0ec015eb5991ddc00e0a3fc31cb2735e DIFF: https://github.com/llvm/llvm-project/commit/7bb615ea0ec015eb5991ddc00e0a3fc31cb2735e.diff LO

[PATCH] D136017: [clang][Interp] Materializing primitive temporaries

2023-02-03 Thread Timm Bäder 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 rG7bb615ea0ec0: [clang][Interp] Materializing primitive temporaries (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D136017

[PATCH] D140415: [flang] stack arrays pass

2023-02-03 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan accepted this revision. kiranchandramohan added a comment. This revision is now accepted and ready to land. LGTM. Please wait till end of day Monday before you submit to provide other reviewers with a chance to provide further comments or request changes. You can consider inlin

[PATCH] D143194: [clang][analyzer] Make messages of StdCLibraryFunctionsChecker user-friendly

2023-02-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I had the plan to add a note that tells the value that is out of range. In the most simple case it can work if we have a fixed value. But this may be the most obvious from the code too. Otherwise a new function can be added that can print the assumed constraint ranges.

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-02-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. So I still don't see this doing the module writing/reading part, which is necessary if you're making this part of the type. I'd like to see more testing/thought put into how this interfaces with overloads and template resolution. Finally, and this is something @aaro

[PATCH] D136751: [clang][Interp] This pointers are writable in constructors

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136751/new/ https://reviews.llvm.org/D136751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-03 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 494610. michaelplatings added a comment. Bugfix: if -msoft-float is set then -mfpu should be none. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D142933 Files: cl

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494611. hokein added a comment. rebase to main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142992/new/ https://reviews.llvm.org/D142992 Files: clang/include/clang/Tooling/Inclusions/StandardLibrary.h clan

[clang] 0505c0b - [clang][Interp][NFC] Make VariableScope::getParent() const

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T15:35:42+01:00 New Revision: 0505c0b8cc998399979fcb970634dc8ee974dc7d URL: https://github.com/llvm/llvm-project/commit/0505c0b8cc998399979fcb970634dc8ee974dc7d DIFF: https://github.com/llvm/llvm-project/commit/0505c0b8cc998399979fcb970634dc8ee974dc7d.diff LO

[PATCH] D142694: [clang][Interp] Only generate disassembly in debug builds

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142694/new/ https://reviews.llvm.org/D142694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] 60dcc70 - [clang][Interp] Only generate disassembly in debug builds

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T15:40:25+01:00 New Revision: 60dcc70e48fa9814a4e0d5e12856bc88b7f927eb URL: https://github.com/llvm/llvm-project/commit/60dcc70e48fa9814a4e0d5e12856bc88b7f927eb DIFF: https://github.com/llvm/llvm-project/commit/60dcc70e48fa9814a4e0d5e12856bc88b7f927eb.diff LO

[PATCH] D142694: [clang][Interp] Only generate disassembly in debug builds

2023-02-03 Thread Timm Bäder 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 rG60dcc70e48fa: [clang][Interp] Only generate disassembly in debug builds (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/header-guard.rst:31 + Use ``#pragma once`` instead of macro guards. Note that ``#pragma once`` + is not part of the C++ standard, and may not work correctly in all cases

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127762#4102436 , @erichkeane wrote: > Finally, and this is something @aaron.ballman probably wants to answer: Is > this sufficiently important that we're willing to take the additional > overhead of 8 bits for each f

[clang] a7f3bca - [clang][Interp][NFCI] Handle DiscardResult for ExprWithCleanups

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T16:07:14+01:00 New Revision: a7f3bcaa8409f67e604bcbe22a960f54ebc657ef URL: https://github.com/llvm/llvm-project/commit/a7f3bcaa8409f67e604bcbe22a960f54ebc657ef DIFF: https://github.com/llvm/llvm-project/commit/a7f3bcaa8409f67e604bcbe22a960f54ebc657ef.diff LO

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-02-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D127762#4102526 , @aaron.ballman wrote: > In D127762#4102436 , @erichkeane > wrote: > >> Finally, and this is something @aaron.ballman probably wants to answer: Is >> this suffic

[clang] 0bf5845 - [Tooling/Inclusions] ensure the Mapping is inititalized in

2023-02-03 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-02-03T16:10:05+01:00 New Revision: 0bf58458d31e238b4ae850e2a0d934190c6682cc URL: https://github.com/llvm/llvm-project/commit/0bf58458d31e238b4ae850e2a0d934190c6682cc DIFF: https://github.com/llvm/llvm-project/commit/0bf58458d31e238b4ae850e2a0d934190c6682cc.diff LO

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 494629. xgupta added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/lib/Sema/SemaExpr.cpp Index: clang/lib/Sema/SemaExpr.cpp

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 494631. xgupta added a comment. remov blank Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 Files: clang/lib/Sema/SemaExpr.cpp clang/test/C/drs/dr4xx.c clang/tes

[clang] 5059193 - Revert "[clang][Interp] Only generate disassembly in debug builds"

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T16:24:04+01:00 New Revision: 50591936a1befc44f2853f1a6493ee1ef2afaa6e URL: https://github.com/llvm/llvm-project/commit/50591936a1befc44f2853f1a6493ee1ef2afaa6e DIFF: https://github.com/llvm/llvm-project/commit/50591936a1befc44f2853f1a6493ee1ef2afaa6e.diff LO

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-03 Thread Evgeny Eltsin via Phabricator via cfe-commits
eaeltsin added a comment. > Looks like we fail to enter the appropriate context somewhere (my guess is > that it might be specific to the attribute but it's hard to say without > picking around), definitely a bug > > I'll be away the next 2 weeks, I'll look at it when I get back. Maybe we > sho

[PATCH] D142800: [Clang][Diagnostic] Add `-Wcomparison-op-parentheses` to warn on chained comparisons

2023-02-03 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 494635. hazohelet added a comment. Address comments from erichkeane: - Fix comment wording - Avoid using macro in test file Implement my proposal for fix-it hint: - In the case of chained relational operators (`<`, `>`, `<=`, `>=`), suggest adding `&&`.

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13611-13653 if (RHS.get()->EvaluateAsInt(EVResult, Context)) { llvm::APSInt Result = EVResult.Val.getInt(); if ((getLangOpts().Bool && !RHS.get()->getType()->isBooleanType() && !R

[clang] 4a2c4ac - [clang][Interp] Support pointers in compound assignment operators

2023-02-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-02-03T16:42:46+01:00 New Revision: 4a2c4acb98694bb90c04e05052898708a03a7ebc URL: https://github.com/llvm/llvm-project/commit/4a2c4acb98694bb90c04e05052898708a03a7ebc DIFF: https://github.com/llvm/llvm-project/commit/4a2c4acb98694bb90c04e05052898708a03a7ebc.diff LO

[PATCH] D142800: [Clang][Diagnostic] Add `-Wcomparison-op-parentheses` to warn on chained comparisons

2023-02-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'm reasonably happy here. I think the chained-comparisons getting the && suggestion is nice. However in each case, the diagnostic is REALLY poor. It isn't really clear to most folks (barely clear to me!) that `'<' within '>'` really means anything. I'd love if w

[PATCH] D140874: [clang][Interp] Support pointer types in compound assignment operations

2023-02-03 Thread Timm Bäder 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 rG4a2c4acb9869: [clang][Interp] Support pointers in compound assignment operators (authored by tbaeder). Changed prior to commit: https://reviews.ll

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124351#4102634 , @eaeltsin wrote: >> Looks like we fail to enter the appropriate context somewhere (my guess is >> that it might be specific to the attribute but it's hard to say without >> picking around), definitely

[PATCH] D142465: [clang][lex] Consolidate PPCallbacks::PragmaDirective parameters

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494644. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142465/new/ https://reviews.llvm.org/D142465 Files: clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h cl

[PATCH] D142030: [pp-trace] Print HashLoc/Introducer parameter

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494646. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142030/new/ https://reviews.llvm.org/D142030 Files: clang-tools-extra/docs/pp-trace.rst clang-tools-extra/pp-trace/PPCallbacksTracker.cpp clang-tools-extra/test/pp-trace/pp-trace-con

[PATCH] D142470: [clang][lex] Add PragmaOnce callback to PPCallbacks

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494647. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142470/new/ https://reviews.llvm.org/D142470 Files: clang/include/clang/Lex/PPCallbacks.h clang/include/clang/Lex/Preprocessor.h clang/lib/Lex/Pragma.cpp Index: clang/lib/Lex/Pragm

[PATCH] D142471: [pp-trace] Add PragmaOnce callback

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494648. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142471/new/ https://reviews.llvm.org/D142471 Files: clang-tools-extra/pp-trace/PPCallbacksTracker.cpp clang-tools-extra/pp-trace/PPCallbacksTracker.h clang-tools-extra/test/pp-trace/

[PATCH] D142673: [clang-tidy] Refactor HeaderGuardCheck to add HeaderGuardStyle

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494649. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142673/new/ https://reviews.llvm.org/D142673 Files: clang-tools-extra/clang-tidy/ClangTidyModule.h clang-tools-extra/clang-tidy/llvm/CMakeLists.txt clang-tools-extra/clang-tidy/llvm/

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494650. KyleFromKitware added a comment. Updated with review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp:569-571 +runPragmaOnceCheck("#ifndef BOTH_H\n" + "#define BOTH_H\n" + "#pragma once\n"

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494652. KyleFromKitware added a comment. Updated documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-extra/

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494653. KyleFromKitware added a comment. Removed comma from documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-t

[clang] 1285172 - [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via cfe-commits
Author: Viktoriia Bakalova Date: 2023-02-03T17:05:25+01:00 New Revision: 1285172c21ef4867d9f895c0b2ab0f338c46e36f URL: https://github.com/llvm/llvm-project/commit/1285172c21ef4867d9f895c0b2ab0f338c46e36f DIFF: https://github.com/llvm/llvm-project/commit/1285172c21ef4867d9f895c0b2ab0f338c46e36f.

[PATCH] D137070: [clang][Interp] Support destructors

2023-02-03 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 assuming no surprises with the new test request. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1915-1916 + +if (const CXXDestructorDecl *Dtor =

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1285172c21ef: [include-mapping] Implement language separation in stdlib recognizer library (authored by VitaNuo, committed by hokein). Changed prior to commit: https://reviews.llvm.org/D142992?vs=49461

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, mgrang. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Replace them with the lib

[PATCH] D137070: [clang][Interp] Support destructors

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 494660. tbaeder marked an inline comment as done. tbaeder added a comment. No surprises I think. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137070/new/ https://reviews.llvm.org/D137070 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/li

[PATCH] D142822: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-02-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I looked at some of the failing tests but can not decide how to fix the problems. The problem seems to be with the extra `namespace std` that was not there before. I do not know what the tests are exactly testing. A part of the tests can be fixed by adding new expect l

[PATCH] D142800: [Clang][Diagnostic] Add `-Wcomparison-op-parentheses` to warn on chained comparisons

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6654 +def warn_comp_op_in_comp_op : Warning< + "'%0' within '%1'">, InGroup, DefaultIgnore; +def warn_rel_op_in_rel_op : Warning< Spit-balling wording ideas: `'%0'

[clang] 74ce297 - Revert "[Clang] Implement Change scope of lambda trailing-return-type"

2023-02-03 Thread Jordan Rupprecht via cfe-commits
Author: Jordan Rupprecht Date: 2023-02-03T08:49:34-08:00 New Revision: 74ce297045bac4bc475b8e762d2a1ea19bb16d3c URL: https://github.com/llvm/llvm-project/commit/74ce297045bac4bc475b8e762d2a1ea19bb16d3c DIFF: https://github.com/llvm/llvm-project/commit/74ce297045bac4bc475b8e762d2a1ea19bb16d3c.di

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-03 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D124351#4102679 , @aaron.ballman wrote: > In D124351#4102634 , @eaeltsin > wrote: > >>> Looks like we fail to enter the appropriate context somewhere (my guess is >>> that it might

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124351#4102818 , @rupprecht wrote: > In D124351#4102679 , @aaron.ballman > wrote: > >> In D124351#4102634 , @eaeltsin >> wrote: >> >>>

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127762#4102578 , @erichkeane wrote: > By standard imp-limits, apparently we only need to handle 8 bits worth for > the Exception Spec types. I'd be tempted, based on exception specs being > deprecated and rarely used

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. LGTM assuming precommit CI doesn't discover any surprises, but hopefully @njames93 or @carlosgalvezp can weigh in as well since they've been in this code more recently than I have. Comment at: clang-tools-extra/unittests/clang-tidy/ReadabilityM

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143280 Files: clang/include/clang/Tooling/Inclusions/StdSymbolM

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. CI on all seven commits in this stack looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. It looks like this is making one of Chromium's clang plugins traverse (and flag) more code: https://bugs.chromium.org/p/chromium/issues/detail?id=1412769 No modules involved :) I don't know if that's expected or not, but maybe that behavior change could be used as an inspi

[clang] 8c71229 - [NFC][TargetParser] Remove llvm/Support/AArch64TargetParser.h

2023-02-03 Thread Archibald Elliott via cfe-commits
Author: Archibald Elliott Date: 2023-02-03T17:34:01Z New Revision: 8c712296fb75ff73db08f92444b35c438c01a405 URL: https://github.com/llvm/llvm-project/commit/8c712296fb75ff73db08f92444b35c438c01a405 DIFF: https://github.com/llvm/llvm-project/commit/8c712296fb75ff73db08f92444b35c438c01a405.diff

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

2023-02-03 Thread Sam Elliott via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c712296fb75: [NFC][TargetParser] Remove llvm/Support/AArch64TargetParser.h (authored by lenary). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140999/new/

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 2 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:34-35 + virtual ~DeclScope() override { this->emitDestruction(); } + void addExtended(const Scope::Local &Local) override { aaron.b

[PATCH] D142673: [clang-tidy] Refactor HeaderGuardCheck to add HeaderGuardStyle

2023-02-03 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494675. KyleFromKitware added a comment. Added virtual destructor to `HeaderGuardStyle`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142673/new/ https://reviews.llvm.org/D142673 Files: clang-tools-extra/clang-tidy/ClangTidyModule.h cl

[clang] 3de55e6 - Fix tests commited in 450a461

2023-02-03 Thread via cfe-commits
Author: ManuelJBrito Date: 2023-02-03T17:52:23Z New Revision: 3de55e6b0e7faf374510aa469aafbf3fba7c848e URL: https://github.com/llvm/llvm-project/commit/3de55e6b0e7faf374510aa469aafbf3fba7c848e DIFF: https://github.com/llvm/llvm-project/commit/3de55e6b0e7faf374510aa469aafbf3fba7c848e.diff LOG:

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-02-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 requested changes to this revision. xbolva00 added a comment. This revision now requires changes to proceed. Huge code duplication. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142609/new/ https://reviews.llvm.org/D142609 ___

[PATCH] D143025: [Fuchsia] Add llvm-mt and llvm-rc to clang bootstrap dependency

2023-02-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/cmake/caches/Fuchsia.cmake:20-46 +# Passthrough stage1 flags to stage1. +set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH + LLVM_ENABLE_ZLIB + ZLIB_INCLUDE_DIR + ZLIB_LIBRARY + LLVM_ENABLE_ZSTD + zstd_DIR Could we move this

[PATCH] D141738: Add initial support for cross compile Windows runtimes under Linux when building Fuchsia clang toolchain

2023-02-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:95 +# and remove these libpath flags. +-libpath:"${LLVM_WINSYSROOT}/VC/Tools/MSVC/14.34.31933/lib/x64" +-libpath:"${LLVM_WINSYSROOT}/VC/Tools/

[PATCH] D143287: [Clang][x86] Change x86 cast intrinsics to use __builtin_nondeterministic_value

2023-02-03 Thread Manuel Brito via Phabricator via cfe-commits
ManuelJBrito created this revision. ManuelJBrito added reviewers: craig.topper, RKSimon. Herald added subscribers: pengfei, mgrang. Herald added a project: All. ManuelJBrito requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The following intr

[PATCH] D139737: [-Wunsafe-buffer-usage] Initiate Fix-it generation for local variable declarations

2023-02-03 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 494689. ziqingluo-90 added a comment. address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139737/new/ https://reviews.llvm.org/D139737 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/clang/Analysis

[PATCH] D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context

2023-02-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Amusingly this fired on some code that used negation with the intention of getting fewer warnings: https://github.com/KhronosGroup/glslang/commit/866f67140ed98865350b53312bba1b654b59f937 :-) Fixed in https://github.com/KhronosGroup/glslang/commit/7341a21b345e7aea1d2791db0

[PATCH] D140179: [-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2023-02-03 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 494693. ziqingluo-90 added a comment. Change the fix-it test style CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140179/new/ https://reviews.llvm.org/D140179 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/cl

[PATCH] D143288: [Fuchsia] Simplified the stage2 build setup

2023-02-03 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added a reviewer: phosek. Herald added a subscriber: abrachet. Herald added a project: All. haowei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch simplified the BOOTSTRAP_ flags, allowing the

[PATCH] D143091: [clang-format] PackConstructorInitializers support PCIS_OnlyNextLine

2023-02-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D143091#4099585 , @Backl1ght wrote: > In D143091#4097534 , > @HazardyKnusperkeks wrote: > >> An entry in the changelog would be nice. > > It is already added I think. I don

[PATCH] D142891: [clang-format] Recognize Verilog non-blocking assignment

2023-02-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Looks ok to me. Please wait for some other opinion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142891/new/ https://re

[PATCH] D142499: [Clang][AMDGPU] Set LTO CG opt level based on Clang option

2023-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Fine with me, but you may need an AMDGPU reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142499/new/ https://reviews.llvm.org/D142499

[PATCH] D142499: [Clang][AMDGPU] Set LTO CG opt level based on Clang option

2023-02-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142499/new/ https://reviews.llvm.org/D142499 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D142384: [C++20] Fix a crash with modules.

2023-02-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D142384#4102937 , @hans wrote: > I don't know if that's expected or not, but maybe that behavior change could > be used as an inspiration for a test case. At least this suggests a way to test this with a C++ unit test: get a

[PATCH] D142948: [OpenCL] Disable vector to scalar types coercion for OpenCL

2023-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It doesn't seem to make sense to have a `LangOpt` for this, if anything a new `CodeGenOpt` feels like a better fit. Then you should probably extend existing classify functions to prevent coercion instead of adding yet another function otherwise you will need to handle

[PATCH] D142077: [Clang][SemaCXX][Coroutines] Fix misleading diagnostics with -Wunsequenced

2023-02-03 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 494707. bruno added a comment. Update patch to reuse `std-coroutine.h` and add a few more other bits there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142077/new/ https://reviews.llvm.org/D142077 Files: clang/lib/Sema/SemaChecking.cpp clang/te

  1   2   >