[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-28 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 260796. jcai19 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Dr

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261595. jcai19 marked 3 inline comments as done. jcai19 added a comment. Update based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1817 + CGM.countAutoVarInit(); +} + jfb wrote: > This isn't the right place to stop auto-init: we can get past this point even > without auto

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261597. jcai19 added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Driver/Options.td

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-03 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261740. jcai19 added a comment. Issue a warning when the proposed flag is used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/Diagno

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: cfe-commits, jfb, xazax.hun, mgorny. Herald added a project: clang. Checks if any calls to POSIX pthread functions expect negative return values. These functions return either 0 on success or an errno on failure, which is positive only. Rep

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216765. jcai19 added a comment. Fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216768. jcai19 added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 7 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:2 +//===--- PthreadReturnCheck.cpp - clang-tidy---===// +//clang-tidy-===//

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. In D66627#1644775 , @gribozavr wrote: > Thanks for the contribution! In abstract, I think it is a good checker, > however, the implementation largely duplicates > `clang-tidy/bugprone/Posix

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217231. jcai19 added a comment. Add pthread function calls return values check to bugprone-posix-return. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-t

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217236. jcai19 added a comment. Update Release Notes and check documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugpr

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217532. jcai19 added a comment. Fix format and test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/PosixReturnChec

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 3 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- New :doc:`bugprone-posix-return + ` check. Eugene.Zelenko wrote: > Check is not new, just modified. Such check should be after new

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixed PR#48894 for AArch64. The issue has been fixed for Arm in https://reviews.llvm.org/D95872

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:217 + // after -march. And while only using the the value of last -march, it + // includes all the options passed via -Wa,-march. + success = true; joerg wrote: > This comme

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Thanks for the comments. Please see my replies inlined. In D103184#2790486 , @DavidSpickett wrote: > Thanks for taking this up! I never got the time for it. > > I'd like to see the test check that there are no unused argument war

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349150. jcai19 added a comment. Limit the change to assembler files, and add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files: clang/lib/Driver/Tool

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang/test/Driver/aarch64-target-as-march.s:4 + +/// The last -march wins, and is handled before -Wa,march. All the values of -Wa,march options are added. +// RUN: %clang --target=aarch64-linux-gn

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. In D103184#2793055 , @DavidSpickett wrote: > $ cat /tmp/test.s > irg x0, x0 > $ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a > /tmp/test.s -o /dev/null > /

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349450. jcai19 marked an inline comment as done. jcai19 added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files: clang/lib/Driver/Too

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349912. jcai19 added a comment. Address the comments and add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files: clang/lib/Driver/ToolChains/Arch/AArc

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2798398 , @DavidSpickett wrote: >> LGTM; any additional thoughts @DavidSpickett ? > > A couple of additional tests just to be safe but otherwise LGTM. > > Also please include in the commit message the "rules" that we're

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349938. jcai19 marked an inline comment as done. jcai19 added a comment. Update test cases based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2799732 , @nickdesaulniers wrote: > That looks better, thanks @jcai19 . Based on @DavidSpickett 's LGTM I think > this is now ready to land. > > @DavidSpickett did ask: > >> Also please include in the commit message t

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd11a26d368c: [AArch64] handle -Wa,-march= (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2803513 , @thakis wrote: > This breaks tests on arm macs: http://45.33.8.238/macm1/10931/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Thanks, will address the breakage ASAP. Reposit

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2803768 , @thakis wrote: > FWIW the failure goes away locally if I revert this change here, so it's > definitely due to this change here. > > Things have been red for a while, probably good to revert while you > invest

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353410. jcai19 edited the summary of this revision. jcai19 added a comment. The original implementation was indeed flawed. The failed test does not specify target triple so on X86 machines the issue won't happen unless I explicitly specify "-target aarch64".

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 closed this revision. jcai19 added a comment. Sorry it's probably clearer to use a new differential review for relanding. I've created https://reviews.llvm.org/D104656. Sorry for the noises. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1031

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353427. jcai19 added a comment. Use the original flawed code for future reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files: clang/lib/Driver/ToolChains

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353431. jcai19 added a comment. Add comments explaning the difference with D103184 . The implementation in D103184 unconditionally calls getAArch64ArchFeaturesFromMarch, which returns false

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D104656#2831034 , @nickdesaulniers wrote: >> This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931 >> > > Shouldn't that be `This relands commit > f

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353440. jcai19 added a comment. After chatting with @nickdesaulniers, we have decided to abondoned D104656 in favor of keeping all the updates to this differential review for consistency. Appologies for any inconvenience cau

[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-23 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0eac975b51cc: Reland "[AArch64] handle -Wa,-march=" (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org

[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-23 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2831542 , @nickdesaulniers wrote: > Thanks for following up on a fix! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add -ftrivial-auto-var-init-stop-after= to limit the number of times stack variables are initialized when -ftrivial-auto-var-init= is used to initialize stack variables to zero or a pattern. This f

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254019. jcai19 added a comment. Add test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Agreed, but having this option may save quite some time when bisecting files with many functions and stack variables, like this one . It will be much easier to write a

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254242. jcai19 added a comment. Remove an unnecessary line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/AST/ASTContext.h clang/include

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254240. jcai19 added a comment. Address some of the concerns. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/AST/ASTContext.h clang/inclu

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. > For example, won't you need some way of figuring out what the 1,134th > variable in a file was after you've successfully bisected? Once we know the Xth variable is causing issues, we can compare the IR or assembly of -fvar-auto-init-stop-after=X-1 and -fvar-auto-init-s

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 4 inline comments as done. jcai19 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1814 +if (StopAfter) { + static unsigned Counter = 0; + if (Counter >= StopAfter) rjmccall wrote: > srhines wrote: > > MaskRay wrote: > >

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D77168#1955312 , @jfb wrote: > Do you not think `pragma` is a more general approach? That's what's used in a > bunch of other cases, and I'd like to see it attempted here. Yes I absolutely agree pragma is a great way to bisect

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-29 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang currently only supports -Wa,--version when -no-integrated-as is used. This adds support to -Wa,--version with -integrated-as. Link: https://github.c

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 334277. jcai19 marked an inline comment as done. jcai19 added a comment. Update tests to address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 Files: clang

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 334315. jcai19 marked an inline comment as done. jcai19 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 Files: clang/lib/Driver/ToolChai

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added inline comments. Comment at: clang/test/Driver/as-version.s:9 +// RUN: | FileCheck --check-prefix=GAS %s +// GAS: GNU assembler nickdesaulniers wrote: > What happens if we run this on windows (where I suspect that GAS isn't > available)? Perhaps

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-31 Thread Jian Cai via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. jcai19 marked an inline comment as done. Closed by commit rG3cc3c0f8352e: Add support to -Wa,--version in clang (authored by jcai19). Changed prior to commit: https:

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. We can probably remove the -fno-integraetd-as case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 ___ cfe-commits mailing list cfe-commi

[PATCH] D99556: Add support to -Wa,--version in clang

2021-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Relanded without -fno-initegrated-as case at https://reviews.llvm.org/rG76d9bc72784d88f4dd57b9939e52c73739438af5. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 ___

<    1   2