[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This broke a bot, I reverted and it's back green here: > [lab.llvm.org/buildbot/#/builders/272/builds/14069](https://lab.llvm.org/buildbot/#/builders/272/builds/14069) Thanks. llvm-project/libc has a pattern like the following. ``` namespace libc { double log2(double x); }

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-16 Thread Mehdi Amini via cfe-commits
joker-eph wrote: This broke a bot, I reverted and it's back green here: https://lab.llvm.org/buildbot/#/builders/272/builds/14069 https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I think I've addressed all comments and changed the patch to rebase on the > > improved tests. > > @AaronBallman @tstellar Are you happy with the current version? > > Please file an issue for this: > > > I added microsoftDemangle tests to show the current behavior. > >

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LG enough TM, thank you @MaskRay! https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Tom Stellard via cfe-commits
https://github.com/tstellar commented: I'm fine with this as long as @AaronBallman approves. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think I've addressed all comments and changed the patch to rebase on the > improved tests. > > @AaronBallman @tstellar Are you happy with the current version? Please file an issue for this: > I added microsoftDemangle tests to show the current behavior. > Since the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: I think I've addressed all comments and changed the patch to rebase on the improved tests. @AaronBallman @tstellar Are you happy with the current version? https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}}

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. LGTM; though I have a strong preference to get bugs on file and linked to regarding: - issues with non-itanium mangling - issues with namespaced identifiers. https://github.com/llvm/llvm-project/pull/87130

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-12 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
emaste wrote: Giving this extra scrutiny is certainly warranted given the context, but #63957 is a legitimate bug. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I really appreciate the suggestions. `alias-unused.cpp` and > > `alias-unused-win.cpp` contain test improvement that should be pre-commited > > once they look good enough. Then this PR can be changed to show the > > difference. > > On a separate note, I wanted to clarify

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s emaste wrote: Git does not track file moves explicitly. You'll find that `git log --follow` will work equally well whether you use `git add` and `git rm` or `git mv`. It

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Erich Keane via cfe-commits
erichkeane wrote: > I really appreciate the suggestions. `alias-unused.cpp` and > `alias-unused-win.cpp` contain test improvement that should be pre-commited > once they look good enough. Then this PR can be changed to show the > difference. > > On a separate note, I wanted to clarify that

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}}

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}}

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: I really appreciate the suggestions. `alias-unused.cpp` and `alias-unused-win.cpp` contain test improvement that should be pre-commited once they look good enough. Then this PR can be changed to show the difference. On a separate note, I wanted to clarify that

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}}

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,36 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. Due to name mangling, we look up the +// demangled name ignoring parameters. This

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s nickdesaulniers wrote: > but git does not preserve file move history... Sure it does; isn't that the point of the `--follow` flag to `git log `?

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,36 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. Due to name mangling, we look up the +// demangled name ignoring parameters. This

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s MaskRay wrote: I did `git mv alias-unused.c alias-unused.cpp`, but git does not preserve file move history... Once the tests are in a good shape, I will pre-commit the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,36 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. Due to name mangling, we look up the +// demangled name ignoring parameters. This

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: Progressing in the right direction and I'm in favor of fixing this issue in clang, with similar levels of caution as my fellow reviewers. I think we can support Microsoft ABI mangling trivially here. That we mangle globals with static linkage in

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void)

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Marking as requesting changes until we get agreement on the behavior for the Microsoft ABI. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s nickdesaulniers wrote: consider using `git mv` when you rename files or move test cases. Makes it very obvious in code review when existing test cases are deleted vs moved

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name MaskRay wrote: Thanks for

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/87130 >From 23422a0b3af3e070fed5ae86ed0f67acec066c0a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 29 Mar 2024 17:48:14 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Jon Roelofs via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1,7 +1,35 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunused -x c++ -verify %s + +#ifdef __cplusplus

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: As the author of https://reviews.llvm.org/D54188 and the TODO added from there, this patch is the right thing to do. I fixed a false positive diagnostic for C and knew that the fix was insufficient for C++. I do appreciate the abundance of

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

  1   2   >