Re: [clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-04 Thread Richard Smith via cfe-commits
Thanks for the revert and the test. I'd imagine that we're forgetting that we need to ask the most recent declaration whether it's weak -- isWeak() can (presumably) change along the redecl chain. Fun :) On Fri, 4 Sep 2020, 07:36 Nico Weber, wrote: > Actually in 2a03f270d69cf1079feb029f84727288e2

Re: [clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-04 Thread Nico Weber via cfe-commits
Actually in 2a03f270d69cf1079feb029f84727288e217588a On Fri, Sep 4, 2020 at 10:27 AM Nico Weber wrote: > Test added in 85a9f6512a3cff797f1964c36c59d53e97a680c4 > > On Fri, Sep 4, 2020 at 10:14 AM Nico Weber wrote: > >> To keep the bots greener over the long weekend, I went ahead and reverted >>

Re: [clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-04 Thread Nico Weber via cfe-commits
Test added in 85a9f6512a3cff797f1964c36c59d53e97a680c4 On Fri, Sep 4, 2020 at 10:14 AM Nico Weber wrote: > To keep the bots greener over the long weekend, I went ahead and reverted > this for now in 7b0332389afd705f46b02fcf87ec3414b8dece34. I'll add a test > for this. > > On Fri, Sep 4, 2020 at

Re: [clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-04 Thread Nico Weber via cfe-commits
To keep the bots greener over the long weekend, I went ahead and reverted this for now in 7b0332389afd705f46b02fcf87ec3414b8dece34. I'll add a test for this. On Fri, Sep 4, 2020 at 10:11 AM Nico Weber wrote: > Hi Richard, > > this breaks Wunreachable-code which now ignore "weak" on redeclaration

Re: [clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-04 Thread Nico Weber via cfe-commits
Hi Richard, this breaks Wunreachable-code which now ignore "weak" on redeclarations: thakis@thakis:~/src/llvm-project$ cat foo.cc extern "C" void foo(void); extern "C" __attribute__((weak)) decltype(foo) foo; void g(), h(); void f() { if (foo) return g(); h(); } thakis@thakis:~/src

[clang] e6393ee - Canonicalize declaration pointers when forming APValues.

2020-09-03 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-09-03T15:35:12-07:00 New Revision: e6393ee813178e9d3306b8e3c6949a4f32f8a2cb URL: https://github.com/llvm/llvm-project/commit/e6393ee813178e9d3306b8e3c6949a4f32f8a2cb DIFF: https://github.com/llvm/llvm-project/commit/e6393ee813178e9d3306b8e3c6949a4f32f8a2cb.diff