[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic xbolva00 wrote: > Please adjust doc

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic Please adjust documentation, the

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-29 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-28 Thread Yuanfang Chen 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 rG27a972a699cd: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-28 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375619. ychen marked an inline comment as done. ychen added a comment. - Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-28 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 with some minor corrections in comments, thank you for the fix! Comment at: clang/lib/Sema/SemaStmt.cpp:381-382 - DiagRuntimeBehavior(Loc, nullptr, PDia

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375422. ychen added a comment. - Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/incl

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 375414. ychen added a comment. - Disable comma operator diagnose in SFINAE context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/D

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3025265 , @aaron.ballman wrote: > In D103938#3024938 , @ychen wrote: > >> In D103938#3018918 , @ychen wrote: >> >>> In D103938#3018588 <

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D103938#3024938 , @ychen wrote: > In D103938#3018918 , @ychen wrote: > >> In D103938#3018588 , >> @aaron.ballman wrote: >> >>> In D10393

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3018918 , @ychen wrote: > In D103938#3018588 , @aaron.ballman > wrote: > >> In D103938#3013503 , @thakis wrote: >> >>> This flags this c

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3018588 , @aaron.ballman wrote: > In D103938#3013503 , @thakis wrote: > >> This flags this code from absl: >> >> template > typename std::enable_if::value, >> int>

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D103938#3013503 , @thakis wrote: > This flags this code from absl: > > template typename std::enable_if::value, > int>::type = > (GenT{}, 0)> > constexpr FlagDefaultArg DefaultArg(int) {

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-23 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D103938#3013503 , @thakis wrote: > This flags this code from absl: Did you see this comment? Looks like this relanded, but it still warns there even though it has an effect there I think (?) Repository: rG LLVM Github Mono

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-22 Thread Yuanfang Chen 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 rGcbbf2e8c8ae7: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-22 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. The changes seem reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 ___

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen requested review of this revision. ychen added a comment. This and 45c0ebe00efb should make `-Werror` build of libcxx tests pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 374080. ychen added a comment. - Remove accidentally included change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 Files: clang/include/clang/Basic/DiagnosticSemaK

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 374078. ychen edited the summary of this revision. ychen added a comment. Herald added a project: libc++. Herald added a subscriber: libcxx-commits. Herald added a reviewer: libc++. This revision now requires review to proceed. - Check the scope correctly: first

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen reopened this revision. ychen added a comment. This revision is now accepted and ready to land. reopen to fix tests failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938 _

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This flags this code from absl: template ::value, int>::type = (GenT{}, 0)> constexpr FlagDefaultArg DefaultArg(int) { return {FlagDefaultSrc(GenT{}.value), FlagDefaultKind::kOneWord}; } (https://source.chromium.org/chromium/chromium/src/+/main:

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D103938#3012940 , @ychen wrote: > @uabelho @gulfem Thanks for the remainder. I could not reproduce the issue > with my Ubuntu box. Could you please attach a reproducer? Never mind, I think I need "-Werror" to reproduce these.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. @uabelho @gulfem Thanks for the remainder. I could not reproduce the issue with my Ubuntu box. Could you please attach a reproducer? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103938/new/ https://reviews.llvm.org/D103938

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. We also started seeing similar `libc++` test failures in our Fuchsia builds: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8835548361443044001/+/u/clang/test/stdout Failed Tests (89): libc++ :: std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D103938#3012910 , @gulfem wrote: > We also started seeing similar `libc++` test failures in our Fuchsia builds: > https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8835548361443044001/+/u/clang/test/stdout

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-20 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi @ychen, A whole bunch of libcxx testcases fail for me when I run with this patch: Failed Tests (90): libc++ :: libcxx/gdb/gdb_pretty_printer_test.sh.cpp libc++ :: std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp libc++ :: std/numerics/rand/r

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-20 Thread Yuanfang Chen 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 rG63e0d038fc20: Diagnose -Wunused-value based on CFG reachability (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO