Page MenuHomePhabricator

MTC (liushuai wang)
compiler engineer

Projects

User does not belong to any projects.

User Details

User Since
Jul 19 2017, 4:18 AM (297 w, 1 d)

Compiler engineer at ByteDance. Concentrate on performance optimization and program analysis.

Recent Activity

Sep 24 2022

MTC committed rG910ad36e1a25: [Clang] Improve diagnostics about the invalid target feature. (authored by MTC).
[Clang] Improve diagnostics about the invalid target feature.
Sep 24 2022, 7:34 PM · Restricted Project, Restricted Project
MTC closed D133563: [Clang] Improve diagnostics about the invalid target feature..
Sep 24 2022, 7:33 PM · Restricted Project, Restricted Project

Sep 23 2022

MTC updated the diff for D133563: [Clang] Improve diagnostics about the invalid target feature..

@MaskRay Very much appreciate your reminder! I missed Aaron's comments.

Sep 23 2022, 12:38 AM · Restricted Project, Restricted Project

Sep 22 2022

MTC updated the diff for D133563: [Clang] Improve diagnostics about the invalid target feature..
  • Fix the clang/test/Misc/warning-flags.c failure pointed out by Aaron
  • Move the test file to clang/Frontend as MaskRay suggested.
Sep 22 2022, 8:33 PM · Restricted Project, Restricted Project

Sep 12 2022

MTC added a comment to D133563: [Clang] Improve diagnostics about the invalid target feature..

Appreciate your comments!

Sep 12 2022, 12:04 AM · Restricted Project, Restricted Project

Sep 11 2022

MTC updated the diff for D133563: [Clang] Improve diagnostics about the invalid target feature..

Improve the diagnostic message and trim the spaces around the feature flags.

Sep 11 2022, 11:55 PM · Restricted Project, Restricted Project

Sep 9 2022

MTC added reviewers for D133563: [Clang] Improve diagnostics about the invalid target feature.: MaskRay, aaron.ballman.
Sep 9 2022, 2:11 AM · Restricted Project, Restricted Project
MTC requested review of D133563: [Clang] Improve diagnostics about the invalid target feature..
Sep 9 2022, 1:53 AM · Restricted Project, Restricted Project

Jun 22 2022

MTC added a comment to D128207: [clang-doc][NFC] Fix reference invalidation assertion failure..

Sorry for the delayed response. Adding the regression test is not as simple as I thought, first of all clang-tools-extra does not enable the assert, see https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/test/lit.site.cfg.py.in . And add the clang-doc when enable --format=html is little bit of tricky.

Jun 22 2022, 4:48 AM · Restricted Project, Unknown Object (Project)

Jun 21 2022

Herald added a project to D56383: [XRay][tools] Use symbols instead of function id: Restricted Project.
Jun 21 2022, 2:35 AM · Restricted Project, Restricted Project

Jun 20 2022

MTC requested review of D128207: [clang-doc][NFC] Fix reference invalidation assertion failure..
Jun 20 2022, 7:28 AM · Restricted Project, Unknown Object (Project)

May 8 2022

MTC removed a watcher for debug-info: MTC.
May 8 2022, 8:03 PM

May 4 2022

MTC added a comment to D123924: [clang-apply-replacements] Added an option to ignore insert conflict..

I don't know enough about this code base to feel comfortable signing off on it, but the changes look reasonable to me FWIW.

May 4 2022, 6:51 PM · Unknown Object (Project), Restricted Project, Restricted Project

Apr 29 2022

MTC added a reviewer for D123924: [clang-apply-replacements] Added an option to ignore insert conflict.: aaron.ballman.
Apr 29 2022, 12:33 AM · Unknown Object (Project), Restricted Project, Restricted Project

Apr 27 2022

MTC accepted D124105: [ELF] Support -plugin-opt=stats-file=.

Appreciate your fix, LGTM. I didn't notice the subtle differences between the option prefixes. Please wait for the last review from @MaskRay before landing it.

Apr 27 2022, 5:22 AM · Restricted Project, Restricted Project

Apr 25 2022

MTC added inline comments to D123924: [clang-apply-replacements] Added an option to ignore insert conflict..
Apr 25 2022, 9:01 PM · Unknown Object (Project), Restricted Project, Restricted Project

Mar 27 2022

MTC added inline comments to D122473: Add new explanation for some shortcomings(WPD, CFI) for lexicon.
Mar 27 2022, 8:30 PM · Restricted Project, Restricted Project

Mar 22 2022

MTC updated MTC.
Mar 22 2022, 12:27 AM

Mar 17 2022

MTC added a comment to D121888: [LTO][ELF] Require asserts for --stats-file= tests..

I appreciate your guidance and the feedback, thanks : )

Mar 17 2022, 8:15 AM · Restricted Project, lld, Restricted Project
MTC added a comment to D121888: [LTO][ELF] Require asserts for --stats-file= tests..

Sorry for the patch abuse, the pre-merge build bot didn't catch the failures, like https://lab.llvm.org/buildbot/#/builders/124/builds/3948 and https://lab.llvm.org/buildbot/#/builders/67/builds/6214. Hopefully, this patch will fix it.

Mar 17 2022, 1:47 AM · Restricted Project, lld, Restricted Project
MTC requested review of D121888: [LTO][ELF] Require asserts for --stats-file= tests..
Mar 17 2022, 1:43 AM · Restricted Project, lld, Restricted Project

Mar 16 2022

MTC added a comment to D121809: [LTO][ELF] Add --stats-file= option..

Sorry to interrupt, seems this patch caused the build failure, see https://lab.llvm.org/buildbot/#/builders/124/builds/3944. I don't have any clue why this failed, Did I miss something for the test file? Like ; REQUIRES: x86 is indispensable?

Ah, for stats printing I believe you need a "REQUIRES: asserts"

Mar 16 2022, 11:54 PM · Restricted Project, lld, Restricted Project
MTC added a comment to D121809: [LTO][ELF] Add --stats-file= option..

Sorry to interrupt, seems this patch caused the build failure, see https://lab.llvm.org/buildbot/#/builders/124/builds/3944. I don't have any clue why this failed, Did I miss something for the test file? Like ; REQUIRES: x86 is indispensable?

Mar 16 2022, 10:24 PM · Restricted Project, lld, Restricted Project
MTC committed rG1c04b52b2594: [LTO][ELF] Add --stats-file= option. (authored by MTC).
[LTO][ELF] Add --stats-file= option.
Mar 16 2022, 9:02 PM · Restricted Project
MTC closed D121809: [LTO][ELF] Add --stats-file= option..
Mar 16 2022, 9:01 PM · Restricted Project, lld, Restricted Project
MTC added a comment to D121809: [LTO][ELF] Add --stats-file= option..

Thanks for all the kind comments, I have updated the patch.

Mar 16 2022, 5:14 PM · Restricted Project, lld, Restricted Project
MTC updated the diff for D121809: [LTO][ELF] Add --stats-file= option..

NFC, improve the comments and the test.

Mar 16 2022, 5:12 PM · Restricted Project, lld, Restricted Project
MTC requested review of D121809: [LTO][ELF] Add --stats-file= option..
Mar 16 2022, 7:58 AM · Restricted Project, lld, Restricted Project

Feb 23 2022

MTC added inline comments to D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue.
Feb 23 2022, 7:05 PM · Unknown Object (Project)
MTC added inline comments to D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue.
Feb 23 2022, 6:36 PM · Unknown Object (Project)

Jan 12 2022

MTC added inline comments to D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue.
Jan 12 2022, 12:44 AM · Unknown Object (Project)

Jan 7 2022

MTC updated subscribers of D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function..

FYI: I'm from Bytedance Inc, @Sockke, and I are fixing the AutoFix bugs recently, most of them will lead to the compilation error. For this bug, fixing the override virtual methods but missing the pure virtual base method, which will cause the compilation error. These annoying bugs will hinder the large-scale deployment of clang-tidy AutoFix in the production environment.

Jan 7 2022, 2:06 AM · Unknown Object (Project)
MTC added a comment to D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg.

This patch has become very complicated now. I summarized this patch and give a figure to illustrate what we have reached. And @Sockke please add some comments to explain the complex part or other means to make this patch more readable.

Jan 7 2022, 1:13 AM · Unknown Object (Project)

Aug 30 2021

MTC committed rGf10d003b0c1e: [tsan] Add environment variable TSAN_SYMBOLIZER_PATH as we do in other… (authored by Enna1).
[tsan] Add environment variable TSAN_SYMBOLIZER_PATH as we do in other…
Aug 30 2021, 7:19 PM
MTC closed D108911: [tsan] Add environment variable TSAN_SYMBOLIZER_PATH as we do in other sanitizers.
Aug 30 2021, 7:19 PM · Unknown Object (Project)

Aug 19 2021

MTC added inline comments to D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init.
Aug 19 2021, 6:31 AM · Unknown Object (Project)

Aug 17 2021

MTC committed rG168ee727186b: [NFC][llvm-xray] add a llvm-xray convert option `no-demangle` (authored by Enna1).
[NFC][llvm-xray] add a llvm-xray convert option `no-demangle`
Aug 17 2021, 9:22 PM
MTC closed D108019: [NFC][llvm-xray] add a llvm-xray convert option `no-demangle`.
Aug 17 2021, 9:22 PM · Restricted Project
MTC resigned from D67149: Fix argument order for BugType instation for .
Aug 17 2021, 7:24 PM · Restricted Project

Aug 16 2021

Herald added a project to D81923: [clang-tidy] Add modernize-use-ranges check.: Unknown Object (Project).
Aug 16 2021, 7:17 PM · Unknown Object (Project), Restricted Project
Herald added a project to D80490: [clang-tidy] Check for rule of five and zero.: Unknown Object (Project).
Aug 16 2021, 7:17 PM · Unknown Object (Project), Restricted Project
Herald added a project to D96685: [WIP] Add noexcept clang-tidy codemod: Unknown Object (Project).
Aug 16 2021, 7:11 PM · Unknown Object (Project), Restricted Project
MTC added a watcher for debug-info: MTC.
Aug 16 2021, 6:53 PM
MTC added a comment to D67149: Fix argument order for BugType instation for .

Hi @NoQ, sorry to bother you. This patch has been on hold for a very long time. It should not have been fixed yet. What's next? Abandon the patch, or improve it yourself?

Aug 16 2021, 6:01 PM · Restricted Project

Aug 15 2021

MTC added a reviewer for D108019: [NFC][llvm-xray] add a llvm-xray convert option `no-demangle`: MTC.
Aug 15 2021, 10:45 PM · Restricted Project
MTC added a comment to D108019: [NFC][llvm-xray] add a llvm-xray convert option `no-demangle`.

Perhaps switch to no-demangle by default and add --symbolize-demangle?

Aug 15 2021, 8:08 PM · Restricted Project

Aug 13 2021

MTC committed rG1f2d40c47f5f: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init (authored by Sockke).
[clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init
Aug 13 2021, 9:13 PM
MTC closed D107641: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init.
Aug 13 2021, 9:13 PM · Unknown Object (Project)

Aug 11 2021

MTC added a comment to D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg.

I think we're a bit off track, and @Sockke wants to accomplish more than one goal in the same patch. I have summarized what we are currently discussing as follow shows:

Aug 11 2021, 12:28 AM · Unknown Object (Project)

Aug 10 2021

MTC added inline comments to D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg.
Aug 10 2021, 6:33 AM · Unknown Object (Project)

Aug 8 2021

MTC added inline comments to D107641: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init.
Aug 8 2021, 11:18 PM · Unknown Object (Project)

Aug 7 2021

MTC added inline comments to D107641: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init.
Aug 7 2021, 6:59 PM · Unknown Object (Project)

Aug 5 2021

MTC added inline comments to D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg.
Aug 5 2021, 6:29 AM · Unknown Object (Project)

Jul 24 2021

MTC accepted D106741: [ASAN] NFC: Remove redundant variable.

Thanks for the cleanup.

Jul 24 2021, 1:18 AM · Restricted Project

Jul 21 2021

MTC added inline comments to D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum..
Jul 21 2021, 5:02 AM · Unknown Object (Project)
MTC added a comment to D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum..

Is this the right decision to make, conceptually? It will leave the variable uninitialised still, and reading such an uninit variable is still an issue, even if it is an enum.

Yeah, that's right. However, it's much more difficult to give enum an initial value than an integer.

Jul 21 2021, 4:59 AM · Unknown Object (Project)

Jul 14 2021

MTC accepted D105973: [ASTMatchers] NFC: Fix the annotation..

LGTM, thanks for your cleanup.

Jul 14 2021, 8:05 PM · Restricted Project

Apr 11 2021

MTC updated MTC.
Apr 11 2021, 2:19 AM

Dec 14 2020

MTC updated MTC.
Dec 14 2020, 2:32 AM

Nov 22 2019

MTC updated subscribers of D67149: Fix argument order for BugType instation for .
Nov 22 2019, 1:43 AM · Restricted Project
MTC added a comment to D67149: Fix argument order for BugType instation for .

Good catch, the fix is reasonable to me. However, I'm no longer wok on the analyzer now, maybe you can add @NoQ Or some other active reviewers to review the code.

Nov 22 2019, 1:43 AM · Restricted Project

Jan 27 2019

MTC resigned from D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions.
Jan 27 2019, 1:06 AM · Restricted Project, Restricted Project
MTC resigned from D52984: [analyzer] Checker reviewer's checklist.
Jan 27 2019, 1:06 AM · Restricted Project

Dec 9 2018

MTC added a comment to D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move..

Hm. I wonder if it would also make sense to model e.g. the get method to return nullptr for moved from smart ptrs. This could help null dereference checker and also aid false path prunning.

Dec 9 2018, 6:45 AM

Dec 6 2018

MTC accepted D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move..
Dec 6 2018, 10:52 PM

Dec 4 2018

MTC accepted D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member.
Dec 4 2018, 4:12 AM
MTC added a comment to D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member.

Please add more context using the -U option, like git diff -U99999 ....

Dec 4 2018, 4:12 AM

Nov 26 2018

MTC added a comment to D54878: [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking..

But given that isa<> are still better than dyn_cast<>, this change might still be worth landing.

We can land this change this time or do the cleaning job in other patches in the future, it's all up to you guys, the active clangd contributors :).

Nov 26 2018, 5:51 AM
MTC retitled D54878: [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking. from [clangd] NFC: Eliminate the unused variable warning. to [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking..
Nov 26 2018, 5:43 AM
MTC updated the diff for D54878: [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking..

Use more concise form.

Nov 26 2018, 5:35 AM

Nov 25 2018

MTC added inline comments to D54878: [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking..
Nov 25 2018, 7:10 PM
MTC created D54878: [clangd] NFC: Prefer `isa<>` to `dyn_cast<>` to do the checking..
Nov 25 2018, 6:42 AM

Nov 24 2018

MTC added inline comments to D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions.
Nov 24 2018, 7:34 AM · Restricted Project, Restricted Project

Nov 22 2018

MTC added a comment to D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions.

Thank you for doing the cleaning that no one else is interested in! Comments is inline below.

Nov 22 2018, 8:36 AM · Restricted Project, Restricted Project

Nov 16 2018

MTC added a comment to D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit..

The "moved-from" terminology we adopt here still feels a bit weird to me, but i don't have a better suggestion, so i just removed the single-quotes so that to at least feel proud about what we have.

I am personally fine with this terminology, this checker corresponds to the cert rule EXP63-CPP. Do not rely on the value of a moved-from object, and moved from is also used in many places in CppCoreGuidelines.

Nov 16 2018, 11:44 PM
MTC closed D54528: [lldb] NFC: Remove the extra ';'.
Nov 16 2018, 5:04 AM

Nov 14 2018

MTC updated the summary of D54528: [lldb] NFC: Remove the extra ';'.
Nov 14 2018, 8:06 AM
MTC set the repository for D54528: [lldb] NFC: Remove the extra ';' to rLLDB LLDB.
Nov 14 2018, 8:03 AM
MTC created D54528: [lldb] NFC: Remove the extra ';'.
Nov 14 2018, 8:02 AM

Nov 12 2018

MTC added a comment to D54401: [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp.

I'm totally fine with this patch personally. However I am not familiar with this part, so can't give substantial help :).

Nov 12 2018, 5:47 AM
MTC added inline comments to D54138: [WebAssembly] Read prefixed opcodes as ULEB128s.
Nov 12 2018, 4:34 AM

Nov 1 2018

MTC added a comment to D52949: [Diagnostics] Implement -Wsizeof-pointer-div .

Sorry for the long delay for this patch! The implementation is fine for me. However, I'm the newbie on clang diagnostics and have no further insight into this checker. @aaron.ballman may have more valuable insights into this checker.

Nov 1 2018, 4:04 AM

Oct 29 2018

MTC added a comment to D53856: [analyzer] Put llvm.Conventions back in alpha.

In addition, clang/lib/StaticAnalyzer/README.txt and other related docs in clang/lib/docs/analyzer are also out of date.

Oct 29 2018, 7:47 PM

Oct 23 2018

MTC added inline comments to D53543: [analyzer] MallocChecker: pr39348: Realize that sized delete isn't a custom delete..
Oct 23 2018, 7:10 PM
MTC added a comment to D52949: [Diagnostics] Implement -Wsizeof-pointer-div .

Second thought, I don't think we should recommend std::size here (maybe it should be okay for clang static analyzers)

uint32_t data[] = {10, 20, 30, 40};
len = sizeof(data)/sizeof(*data); // "warn" on valid code to recommend std::size? I dont agree with such behaviour.

Oct 23 2018, 9:19 AM
MTC added inline comments to D53543: [analyzer] MallocChecker: pr39348: Realize that sized delete isn't a custom delete..
Oct 23 2018, 6:53 AM

Oct 10 2018

MTC updated subscribers of D53024: [analyzer][www] Add more open projects.

Also, a lot of items on this list is outdated, but I joined the project relatively recently, so I'm not sure what's the state on all of them.

Oct 10 2018, 11:10 PM

Oct 9 2018

MTC added a comment to D52984: [analyzer] Checker reviewer's checklist.

Greate idea! If we can enrich this list, it will not only help the reviewer, but also help beginners, like me, avoid some pitfalls when developing a new checker.

Oct 9 2018, 5:29 AM · Restricted Project

Aug 29 2018

MTC accepted D51390: [analyzer] CallDescription: Improve array management..

Thank you for digging in to delete that meaningless constructor, NoQ! And sorry for my technology debt : ).

Aug 29 2018, 7:20 PM

Aug 23 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..
In D48027#1209844, @NoQ wrote:

So i believe that one of the important remaining problems with CallDescription is to teach it to discriminate between global functions and methods. We can do it in a number of ways:

  1. Make a special sub-class for CallDescription depending on the sort of the function (too verbose),
  2. Tag all items in the list as "record" vs. "namespace" (too many tags),
  3. Dunno, tons of other boring and verbose approaches,
  4. Change our PreCall/PostCall callbacks to callback templates that let allow the user subscribe to specific sub-classes of CallEvent similarly to how he can subscribe to different kinds of statements in PreStmt<Class>/PostStmt<Class>, and then the user doesn't need to write any code to check it dynamically.
Aug 23 2018, 7:13 PM

Aug 22 2018

MTC updated the summary of D48027: [analyzer] Improve `CallDescription` to handle c++ method..
Aug 22 2018, 6:30 AM
MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

Sorry for the delay, I think this is OK to commit.
As a possible improvement, I can imagine making it slightly stricter, e.g. you could only skip QualifiedNames for inline namespaces and the beginning. Maybe add support for staring with "" or :: to even disable skipping namespaces at the beginning?
But these are just nice to have features, I am perfectly ok with not having them or doing it in a followup patch.

Aug 22 2018, 6:29 AM

Aug 21 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

@xazax.hun What do you think?

Aug 21 2018, 4:23 AM

Aug 17 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

Generally looks good, I only wonder if this works well with inline namespaces. Could you test? Probably it will.

Aug 17 2018, 5:38 AM
MTC updated the diff for D48027: [analyzer] Improve `CallDescription` to handle c++ method..
  • rebase
  • Since we have enhanced the ability of CallDescription, remove the helper method isCalledOnStringObject().
Aug 17 2018, 5:24 AM

Aug 13 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

kindly ping!

Aug 13 2018, 7:28 AM

Aug 7 2018

MTC created D50382: [analyzer] Fix a typo in `RegionStore.txt`..
Aug 7 2018, 5:25 AM

Jul 26 2018

MTC updated the diff for D48027: [analyzer] Improve `CallDescription` to handle c++ method..

@xazax.hun Thanks for your tips! After some investigation, MatchFinder::match just traverse one ASTNode, that means match(namedDecl(HasNameMatcher())) and match(namedDecl(matchesName())) both not traverse children. So there are three ways to match the specified AST node.

Jul 26 2018, 9:36 AM

Jul 4 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

Thanks for your review, NoQ!

Jul 4 2018, 7:15 AM

Jun 29 2018

MTC added a comment to D48027: [analyzer] Improve `CallDescription` to handle c++ method..

kindly ping!

Jun 29 2018, 7:30 PM