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

2022-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D137205#3951230 , @Febbe wrote: > In D137205#3950722 , @kadircet > wrote: > >> another thing that i noticed is usage of east consts in the implementation >> files. no one seem to hav

[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.

2022-11-28 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, looks good from my side, a few nits on the test. Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:364 + EXPECT_EQ(PI.getPublic(PrivateFE.get(

[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 478145. VitaNuo marked an inline comment as done. VitaNuo added a comment. Address the remaining comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138678/new/ https://reviews.llvm.org/D138678 Files: cl

[PATCH] D136594: [clangd] Add support for semantic token type "operator"

2022-11-28 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 478146. ckandeler added a comment. Using operators on expressions with dependent types now considered "complex", Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136594/new/ https://reviews.llvm.org/D136594 Fil

[PATCH] D136594: [clangd] Add support for semantic token type "operator"

2022-11-28 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. Now seems to do what we want. Should I switch the modifier around? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136594/new/ https://reviews.llvm.org/D136594 ___ cfe-commits ma

[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 478148. VitaNuo added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138678/new/ https://reviews.llvm.org/D138678 Files: clang-tools-extra/include-cleaner/include/clang-include-cleaner/Reco

[clang-tools-extra] 10d183b - [include-cleaner] Capture private headers in PragmaIncludes.

2022-11-28 Thread Haojian Wu via cfe-commits
Author: Viktoriia Bakalova Date: 2022-11-28T10:02:02+01:00 New Revision: 10d183b889daab4512d476c1645d24d4e8946e8c URL: https://github.com/llvm/llvm-project/commit/10d183b889daab4512d476c1645d24d4e8946e8c DIFF: https://github.com/llvm/llvm-project/commit/10d183b889daab4512d476c1645d24d4e8946e8c.

[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.

2022-11-28 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 rG10d183b889da: [include-cleaner] Capture private headers in PragmaIncludes. (authored by VitaNuo, committed by hokein). Repository: rG LLVM Github

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. balazske requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D138709: Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clang/unittests/Lex/HeaderSearchTest.cpp:155 + addSearchDir("/x/../y/"); + EXPECT_EQ(Search.suggestPathToFileForDiagnostics("/x/../y/z", +

[clang] 2c1fa73 - Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

2022-11-28 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-28T10:09:13+01:00 New Revision: 2c1fa734598c9470139720565fbf624a5156ec03 URL: https://github.com/llvm/llvm-project/commit/2c1fa734598c9470139720565fbf624a5156ec03 DIFF: https://github.com/llvm/llvm-project/commit/2c1fa734598c9470139720565fbf624a5156ec03.diff LO

[PATCH] D138709: Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

2022-11-28 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. Closed by commit rG2c1fa734598c: Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo" (authored by sammccall). Changed prior to commit: https://reviews.l

[clang-tools-extra] 962343a - [include-cleaner] Fix walkUsed only report a single macro ref.

2022-11-28 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-11-28T10:12:10+01:00 New Revision: 962343a979d51cea9363167e9121c446abbdfdbc URL: https://github.com/llvm/llvm-project/commit/962343a979d51cea9363167e9121c446abbdfdbc DIFF: https://github.com/llvm/llvm-project/commit/962343a979d51cea9363167e9121c446abbdfdbc.diff LO

[PATCH] D138753: [AArch64TargetParser] getArchFeatures -> getArchFeature

2022-11-28 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas added inline comments. Comment at: llvm/unittests/Support/TargetParserTest.cpp:1686 -TEST(TargetParserTest, AArch64ArchFeatures) { - std::vector Features; Can you keep a unit test covering the new version of the function? Repository: rG LLVM Gith

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-11-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. For non-functional clean-ups generally llvm doesn't require pre-commit review - I did communicate here so people involved in the original change wouldn't miss the clean-up. I do agree that what commits to pre-review is a fine line, and usually try to err on the side of p

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Some of the code is copied from `UnhandledExceptionAtNewCheck`. Probably these checks can be merged into one `NewExceptionHandlingCheck`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138777/new/ https://reviews.llvm.org/

[PATCH] D138753: [AArch64TargetParser] getArchFeatures -> getArchFeature

2022-11-28 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson added inline comments. Comment at: llvm/unittests/Support/TargetParserTest.cpp:1686 -TEST(TargetParserTest, AArch64ArchFeatures) { - std::vector Features; pratlucas wrote: > Can you keep a unit test covering the new version of the function? The old v

[PATCH] D138779: [include-cleaner] Filter out references that not spelled in the main file.

2022-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: kadircet, sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. A HTML report of gtest after this patch: https://gist.githubusercontent.com/hokein/73eee6f65a803e5702d8388c18

[PATCH] D138780: [include-cleaner] Minor fixes to parseIWYUPragma:

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a subscriber: kadircet. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - remove assert that can fail for i

[PATCH] D137836: [Support] Move getHostNumPhysicalCores to Threading.h

2022-11-28 Thread Sam Elliott via Phabricator via cfe-commits
lenary marked 3 inline comments as done. lenary added a comment. Going to attempt to land this again today. Comment at: llvm/lib/Support/Threading.cpp:59 if (MaxThreadCount <= 0) MaxThreadCount = 1; if (ThreadsRequested == 0) tmatheson wrote: > It lo

[PATCH] D138780: [include-cleaner] Minor fixes to parseIWYUPragma:

2022-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks! The change is LG, I think it would be great to have some tests. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:146 // to share the code? static llvm::Optional parseIWYUPragma(const char *Text) { + // Skip the comment start, // or

[PATCH] D138779: [include-cleaner] Filter out references that not spelled in the main file.

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/FindHeaders.cpp:58 +bool isSpelledInMainFile(SourceLocation Loc, const SourceManager &SM) { + return SM.isWrittenInMainFile(Loc.isMacroID() ? SM.getSpellingLoc(Loc) : Loc); +} th

[PATCH] D137782: [clang-tidy]bugprone-fold-init-type

2022-11-28 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137782/new/ https://reviews.llvm.org/D137782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 478162. sammccall retitled this revision from "[include-cleaner] Minor fixes to parseIWYUPragma:" to "[include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions". sammccall edited the summary of this revision. sammccall added a comment. Herald

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 478163. sammccall added a comment. clean dead tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138780/new/ https://reviews.llvm.org/D138780 Files: clang-tools-extra/clangd/Headers.cpp clang-tools-extr

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:146 // to share the code? static llvm::Optional parseIWYUPragma(const char *Text) { + // Skip the comment start, // or /*. hokein wrote: > I'd like to have some unitt

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

2022-11-28 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. This revision is now accepted and ready to land. Thank you for working on this @lenary - LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137838/new/ https://reviews.llvm.org/D137

[PATCH] D138782: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added a subscriber: kadircet. Herald added a project: All. VitaNuo requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Keep the includes contained between IWYU begin_keep and end_keep pragmas.

[PATCH] D138782: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 478166. VitaNuo added a comment. Remove unnecessary code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138782/new/ https://reviews.llvm.org/D138782 Files: clang-tools-extra/include-cleaner/lib/Record.cpp

[PATCH] D136078: [RFC] Use-after-return binary metadata.

2022-11-28 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov updated this revision to Diff 478168. dvyukov marked 3 inline comments as done. dvyukov added a comment. rebase and adressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136078/new/ https://reviews.llvm.org/D136078 Files: clang

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

2022-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > by design clang-format only performs white-space changes clang-format does support east/west const enforcement with the `QualifierAlignment` option. From experience, I strongly encourage repo owners to enable it repo-wide to avoid these kinds of discussions. Unt

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 478170. sammccall added a comment. tweak whitespace and */ behavior Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138780/new/ https://reviews.llvm.org/D138780 Files: clang-tools-extra/clangd/Headers.cpp

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. Thanks for this new check. Could you please link here results of this checker on som relevant open source projects? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138777/new/ https://reviews.llvm.org/D138777 ___

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

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D137205#3952864 , @carlosgalvezp wrote: >> by design clang-format only performs white-space changes > > clang-format does support east/west const enforcement with the > `QualifierAlignment` option. From experience, I strong

[PATCH] D136078: [RFC] Use-after-return binary metadata.

2022-11-28 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov added a comment. PTAL I've named everything consistently as "SanitizeBinaryMetadata", fixed interning of metadata, and added a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136078/new/ https://reviews.llvm.org/D136078 __

[clang] 7940888 - [AMDGPU] Intrinsic to expose s_wait_event for export ready

2022-11-28 Thread David Stuttard via cfe-commits
Author: David Stuttard Date: 2022-11-28T11:26:15Z New Revision: 7940888c5987de2b5cbb4ec45b482df88e822f67 URL: https://github.com/llvm/llvm-project/commit/7940888c5987de2b5cbb4ec45b482df88e822f67 DIFF: https://github.com/llvm/llvm-project/commit/7940888c5987de2b5cbb4ec45b482df88e822f67.diff LOG

[PATCH] D138216: [AMDGPU] Intrinsic to expose s_wait_event for export ready

2022-11-28 Thread David Stuttard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7940888c5987: [AMDGPU] Intrinsic to expose s_wait_event for export ready (authored by dstuttard). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138216/new/

[PATCH] D138788: [SVE] Change some bfloat lane intrinsics to use i32 immediates

2022-11-28 Thread David Sherwood via Phabricator via cfe-commits
david-arm created this revision. david-arm added reviewers: sdesmalen, paulwalker-arm, kmclaughlin. Herald added subscribers: ctetreau, psnobl, hiraditya, tschuett. Herald added a reviewer: efriedma. Herald added a project: All. david-arm requested review of this revision. Herald added projects: cl

[clang] dbb94b4 - [analyzer] Remove the unused LocalCheckers.h header

2022-11-28 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-11-28T13:08:38+01:00 New Revision: dbb94b415a00c444d6f91809dfcbb989d970c63e URL: https://github.com/llvm/llvm-project/commit/dbb94b415a00c444d6f91809dfcbb989d970c63e DIFF: https://github.com/llvm/llvm-project/commit/dbb94b415a00c444d6f91809dfcbb989d970c63e.diff

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

2022-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > we can't rehash the discussion here because it's too big Indeed, it's a major task to undertake so I don't mean to hijack this thread with that :) Just wanted to point out clang-format supports it in case it's of interest (it's a fairly new addition that not eve

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138780/new/ https://reviews.llvm.org/D138780

[PATCH] D138782: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:299 + } else if (Pragma->starts_with("end_keep")) { +InsidePragmaKeepBlock = false; + } using a simple variable is not enough to handle the nested case li

[clang] 99b5ec1 - [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-28T13:20:09+01:00 New Revision: 99b5ec1fd1a70680a8483e5efb86807254e44e0e URL: https://github.com/llvm/llvm-project/commit/99b5ec1fd1a70680a8483e5efb86807254e44e0e DIFF: https://github.com/llvm/llvm-project/commit/99b5ec1fd1a70680a8483e5efb86807254e44e0e.diff LO

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 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. Closed by commit rG99b5ec1fd1a7: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions (authored by sammccall). Repository: rG LLVM Github Monorepo

[PATCH] D138782: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:299 + } else if (Pragma->starts_with("end_keep")) { +InsidePragmaKeepBlock = false; + } hokein wrote: > using a simple variable is not enough to handle t

[PATCH] D138520: [clangd] Make decision forest model optional

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for doing this! Comment at: clang-tools-extra/clangd/CMakeLists.txt:52 + list(APPEND COMPLETIONMODEL_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/CompletionModel.cpp) + add_definitions(-DCLANGD_DECISION_FOREST=1) +endif() Rather than

[PATCH] D138792: [AArch64] Improve TargetParser API

2022-11-28 Thread Tomas Matheson via Phabricator via cfe-commits
tmatheson created this revision. tmatheson added reviewers: lenary, pratlucas, dmgreen, tschuett, DavidSpickett, danielkiss. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. tmatheson requested review of this revision. Herald added subscribers: llvm-commits, cfe-com

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-11-28 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov added inline comments. Comment at: llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp:79 + }; + MD->replaceOperandWith(1, MDNode::get(F.getContext(), NewAuxMDs)); + return false; Should this be a new method on MDBuilder? Repository: rG LLVM Github Monore

[PATCH] D127462: [Clang] Begin implementing Plan 9 C extensions

2022-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127462#3950108 , @ksaunders wrote: >> Just to check -- do you think (some of) these features are something you >> wish to propose to WG14 for adoption into C? e.g., are you aiming to get >> multiple compilers to implem

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

2022-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. ping. We need to get this going, reminder, this was caught because it caused a visible miscompilation. @rjmccall are you satisfied with the way we emit srcloc info? @aaron.ballman thoughts on the docs changes? One unanswered question i have, is if we can get the excep

[PATCH] D138779: [include-cleaner] Filter out references that not spelled in the main file.

2022-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Maybe I am missing some context here, but why are we trying to filter out references outside of the main file? ATM there's no concept of main file in neither walkUsed, it just receives some ast nodes for analyzing references to declarations inside these nodes, and the

[clang-tools-extra] c7fc0ab - [clangd] Add script to maintain list of fast clang-tidy checks

2022-11-28 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-28T14:29:23+01:00 New Revision: c7fc0abf510fb066c8bf581a5668235b95d00242 URL: https://github.com/llvm/llvm-project/commit/c7fc0abf510fb066c8bf581a5668235b95d00242 DIFF: https://github.com/llvm/llvm-project/commit/c7fc0abf510fb066c8bf581a5668235b95d00242.diff LO

[PATCH] D138491: [clangd] Add script to maintain list of fast clang-tidy checks

2022-11-28 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. Closed by commit rGc7fc0abf510f: [clangd] Add script to maintain list of fast clang-tidy checks (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D138797: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added a subscriber: kadircet. Herald added a project: All. VitaNuo requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Implement support for begin_keep/end_keep pragmas. Repository: rG LLVM

[clang-tools-extra] 551c7e8 - [clangd] Fix broken call missed in D138780

2022-11-28 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-11-28T14:36:48+01:00 New Revision: 551c7e81891abcf49aff625187f348ff119c4618 URL: https://github.com/llvm/llvm-project/commit/551c7e81891abcf49aff625187f348ff119c4618 DIFF: https://github.com/llvm/llvm-project/commit/551c7e81891abcf49aff625187f348ff119c4618.diff LO

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Looks like it breaks the build: llvm-project/clang-tools-extra/clangd/index/CanonicalIncludes.cpp: In member function ‘virtual bool clang::clangd::collectIWYUHeaderMaps(clang::clangd::CanonicalIncludes*)::PragmaCommentHandler::HandleComment(clang::Preprocessor&, clan

[PATCH] D138520: [clangd] Make decision forest model optional

2022-11-28 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.h:129 +#if defined(CLANGD_DECISION_FOREST) +# define DEFAULT_RANKING_MODEL DecisionForest sammccall wrote: > this approach feels a bit heavy on the preprocessor, especially for a h

[PATCH] D138797: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 478203. VitaNuo added a comment. Add a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138797/new/ https://reviews.llvm.org/D138797 Files: clang-tools-extra/include-cleaner/lib/Record.cpp clang-tool

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

2022-11-28 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197 +llvm::cl::opt P1689TargetedCommand( +"p1689-targeted-command", llvm::cl::Optional, +llvm::cl::desc("Only supported for P1689, the targeted command of which "

[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

2022-11-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D138780#3953229 , @ABataev wrote: > Looks like it breaks the build: > > llvm-project/clang-tools-extra/clangd/index/CanonicalIncludes.cpp: In > member function ‘virtual bool > clang::clangd::collectIWYUHeaderMaps(clang::c

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

2022-11-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Factor out the actual variable allocation logic int

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

2022-11-28 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197 +llvm::cl::opt P1689TargetedCommand( +"p1689-targeted-command", llvm::cl::Optional, +llvm::cl::desc("Only supported for P1689, the targeted command of which "

[PATCH] D138803: [RISCV] Support vector crypto extension C intrinsics

2022-11-28 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, s

[PATCH] D136554: Implement CWG2631

2022-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: usaxena95, erichkeane, hubert.reinterpretcast. aaron.ballman added a comment. The changes generally LGTM, but I'd appreciate a second set of eyes on the changes just to double-check we're implementing the resolution properly. Comment at: clang/in

[PATCH] D138749: [clang] Compare constraints before diagnosing mismatched ref qualifiers (GH58962)

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I can't find any example that breaks and needs the `AreConstraintExpressionsEqual`, so feel free to do it if you'd like. Comment at: clang/lib/Sema/SemaOverload.cpp:1324 +if ((NewRC != nullptr) != (OldRC != nullptr)) + // RC are most certai

[PATCH] D138749: [clang] Compare constraints before diagnosing mismatched ref qualifiers (GH58962)

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Feel free to clarify the comment yourself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138749/new/ https://reviews.llvm.org/D138749 _

[PATCH] D138805: [RISCV] Support vector crypto extension C intrinsics

2022-11-28 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, s

[PATCH] D136554: Implement CWG2631

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 478216. cor3ntin added a comment. Remove extra ; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ExprC

[PATCH] D136554: Implement CWG2631

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/ExprCXX.h:1274 + *getTrailingObjects() = RewrittenExpr; setDependence(computeDependence(this)); } aaron.ballman wrote: > Do we need to update `computeDependence()` to account for the

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-28 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, jdoerfert, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2022-11-28 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, s

[PATCH] D138797: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:219 +if ((Top.Block && HashLine > Top.SeenAtLine) || +Top.SeenAtLine == HashLine) { + Out->ShouldKeep.insert(HashLine); nit: remove the brace for the `if`,

[PATCH] D138727: [clang] Skip defaulted functions in zero-as-null-pointer-constant.

2022-11-28 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 478227. massberg added a comment. Sync to head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138727/new/ https://reviews.llvm.org/D138727 Files: clang/lib/Sema/Sema.cpp clang/test/SemaCXX/warn-zero-nullp

[PATCH] D138779: [include-cleaner] Filter out references that not spelled in the main file.

2022-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 478228. hokein marked 3 inline comments as done. hokein added a comment. address comments: - polish and simplify the tests - inline the spelling-loc-check logic - add a comment for the walkUsed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138792: [AArch64] Improve TargetParser API

2022-11-28 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. Looks like a good direction to me. Plenty more bits in clang that should really live in the target parser, and this is a great start at moving those. My only issue is the use of

[PATCH] D138702: support for HIP non hostcall printf

2022-11-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. Herald added a subscriber: wdng. I have a few questions. First, why surface this to users? If we really need to, I don't think this is the right flag name/design. A named argument to some kind of printf lowering flag would be bet

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/MultipleNewInOneExpressionCheck.h:25 + bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { +return LangOpts.CPlusPlus11; + } I think check is

[PATCH] D138821: Remove filtering from UsingDecl visit.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added a subscriber: kadircet. Herald added a project: All. VitaNuo requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Removes filtering from the VisitUsingDecl method for implementation files.

[PATCH] D129531: [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2022-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for addressing the comments and sorry for a wait before the comments. Please see the comment about syntactic form, I might be holding it wrong, but it looks like we actually loose the syntactic form completely in this case. Comment at: cla

[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.

2022-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. bitcoin, contour, qtbase, xerces was checked but nothing was detected by the check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138777/new/ https://reviews.llvm.org/D138777 _

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-28 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Can you link to a specification? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138807/new/ https://reviews.llvm.org/D138807 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137487/new/ https://reviews.llvm.org/D137487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D138822: [clang] Add test for CWG36

2022-11-28 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill created this revision. Endill added a project: clang-language-wg. Herald added a project: All. Endill requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138822 Files: c

[PATCH] D129531: [clang][C++20] P0960R3 and P1975R0: Allow initializing aggregates from a parenthesized list of values

2022-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:581 + Expr *filler = nullptr; + if (auto *ILE = dyn_cast(ExprToVisit)) +filler = ILE->getArrayFiller(); ilya-biryukov wrote: > ayzhao wrote: > > ilya-biryukov wrote: > > > - Sh

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1374 const Decl *Callee = E->getCalleeDecl(); - if (const auto *FuncDecl = dyn_cast_or_null(Callee)) { + if (const auto *FuncDecl = dyn_cast_if_present(Callee)) { const Function *Func

[PATCH] D138822: [clang] Add test for CWG36

2022-11-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Could you make a separate pull request for updating the core issue list (I didn't know it had been updated recently)? Or, i think you could commit the update of the core issue list directly (do you have commit rights?) and then work on the DR. Repository: rG LLVM Gi

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1374 const Decl *Callee = E->getCalleeDecl(); - if (const auto *FuncDecl = dyn_cast_or_null(Callee)) { + if (const auto *FuncDecl = dyn_cast_if_present(Callee)) { const Function *Func =

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1357 +if (InterpretBuiltin(S, PC, BID)) { + NewFrame.release(); + return true; tbaeder wrote: > erichkeane wrote: > > What is going on here? Why is this not a leak? > The

[PATCH] D138598: [OpenMP] Do not add wrapper headers if using '-nogpuinc'

2022-11-28 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37edd910478d: [OpenMP] Do not add wrapper headers if using '-nogpuinc' (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138598/new/ http

[clang] 37edd91 - [OpenMP] Do not add wrapper headers if using '-nogpuinc'

2022-11-28 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-11-28T10:20:31-06:00 New Revision: 37edd910478d911f93044d524a61974c991e6cae URL: https://github.com/llvm/llvm-project/commit/37edd910478d911f93044d524a61974c991e6cae DIFF: https://github.com/llvm/llvm-project/commit/37edd910478d911f93044d524a61974c991e6cae.diff

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1357 +if (InterpretBuiltin(S, PC, BID)) { + NewFrame.release(); + return true; erichkeane wrote: > tbaeder wrote: > > erichkeane wrote: > > > What is going on here? Why is thi

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-28 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:827 {{"zvfh"}, {ImpliedExtsZvfh}}, +{{"zvkb"}, {ImpliedExtsV}}, +{{"zvkg"}, {ImpliedExtsV}}, Does Crypto really require V or could it work with Zve? Repository: rG

[PATCH] D138387: [Clang] Implement static operator[]

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138387/new/ https://reviews.llvm.org/D138387 ___ cfe-commits mailing list cfe-co

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2022-11-28 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. Some very high level comments for the moment. Until the spec is frozen, these need to be moved into the experimental namespace. You should also add a mention of them under the experimental list in docs/RISCVUsage. A link to the current spec version - along with an exac

[PATCH] D138797: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 478256. VitaNuo added a comment. Address review comments. Use annotation points instead of line numbers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138797/new/ https://reviews.llvm.org/D138797 Files: clan

[PATCH] D138797: [include-cleaner] Implement IWYU begin_keep/end_keep pragma support.

2022-11-28 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo marked an inline comment as done. VitaNuo added inline comments. Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:349 EXPECT_TRUE(PI.shouldKeep(3)); + EXPECT_FALSE(PI.shouldKeep(13)); + EXPECT_TRUE(PI.shouldKeep(14)); hokein wro

[PATCH] D126818: Itanium ABI: Implement mangling for constrained friends

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D126818#3943071 , @dfrib wrote: > In D126818#3941201 , @erichkeane > wrote: > >> [...] particularly since the suggested wording says the opposite of what I >> THOUGHT the discussio

[PATCH] D138210: [clang] Require parameter pack to be last argument in concepts.

2022-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the explanation. LGTM! And thanks for adding an assert. It's interesting that recovery for classes seems to be a bit better here: template struct invalid {}; int a = invalid(10); // there is no error: undefined

[PATCH] D138727: [clang] Skip defaulted functions in zero-as-null-pointer-constant.

2022-11-28 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 478261. massberg added a comment. Run clang-format on changed files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138727/new/ https://reviews.llvm.org/D138727 Files: clang/lib/Sema/Sema.cpp clang/test/Se

[PATCH] D136078: Use-after-return sanitizer binary metadata

2022-11-28 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: llvm/include/llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h:38 + +const char *const kSanitizerBinaryMetadataCoveredSection = "sanmd_covered"; +const char *const kSanitizerBinaryMetadataAtomicsSection = "sanmd_atomics"; ---

  1   2   3   >