[clang] [NFC][CLANG] Fix null pointer dereferences (PR #86760)

2024-03-27 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: Looks good to me. https://github.com/llvm/llvm-project/pull/86760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 9ec2e0184be423223f6e5b5ba58c3a7224ae1b93 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/2] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/12] Bugfix for choosing the more specialized overload Th

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-06 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/11] Bugfix for choosing the more specialized overload Th

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @erichkeane Thank you for the suggestions, I have removed the checking for C++20 and I also changed to the `Args.resize(std::min(...))` based on what you suggested. Is there anything else to be done? https://github.com/llvm/llvm-project/pull/83279

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/10] Bugfix for choosing the more specialized overload Th

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/9] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: > I don't think checking for c++20 is useful because rewritten candidates are a > c++20- feature anyway Yes, but the resolution of the DR also talks about the reference type of the object parameter. (If I apply the patch retroactively the code will get simpler.) https://github.

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @erichkeane a question: this PR is partly a fix for a DR for c++20. Right now I only apply the fix for C++20 and newer. Is there a reason for not applying this fix for older standards? I don't see how it would break any existing code, and making the fix retroactive doesn't make a

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/8] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-04 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: I have added tests for rvalref-s and `volatile`-s. https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-04 Thread Botond István Horváth via cfe-commits
@@ -68,3 +68,35 @@ template struct X {}; X<1> x; #endif } +namespace dr2445 { // dr2445: 19 HoBoIs wrote: done https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-04 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/7] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: > DR changes looks good now, save for a nitpick. However, I'm leaving it to > other reviewers to check contents of the test. It looks like an example from > the DR, but I don't feel qualified to say whether this test has sufficient > coverage. I have added tests to other files w

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
@@ -14478,7 +14478,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2445.html";>2445 C++20 Partial ordering with rewritten candidates -Unknown +Clang 18 HoBoIs wrote: done https://github.com/llvm/llvm-pr

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
@@ -14478,7 +14478,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2445.html";>2445 C++20 Partial ordering with rewritten candidates -Unknown +Clang 18 HoBoIs wrote: I'm on it. While we are at here: shou

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/5] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-29 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-29 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/4] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-29 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-29 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/3] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 1/2] Bugfix for choosing the more specialized overload Ther

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @zygoloid @erichkeane Could you take a look? https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs created https://github.com/llvm/llvm-project/pull/83279 There was a bug in clang where it couldn't choose which overload candidate is more specialized if it was comparing a member-function to a non-member function. Previously, this was detected as an ambigouity, now c

[clang] Avoid printing overly large integer. (PR #75902)

2023-12-19 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs edited https://github.com/llvm/llvm-project/pull/75902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid printing overly large integer. (PR #75902)

2023-12-19 Thread Botond István Horváth via cfe-commits
@@ -17132,6 +17132,9 @@ static bool ConvertAPValueToString(const APValue &V, QualType T, case BuiltinType::WChar_U: { unsigned TyWidth = Context.getIntWidth(T); assert(8 <= TyWidth && TyWidth <= 32 && "Unexpected integer width"); + if (V.ge

[clang] [clang] Correct end for the `CastOperation.OpRange` (PR #69480)

2023-10-24 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/69480 From c06535386eb736fc11397cf11efaa8d52fdae4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20Istv=C3=A1n=20Horv=C3=A1th?= <56926027+hob...@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:05:01 +0200 Subject

[clang-tools-extra] [clang] Correct end for the `CastOperation.OpRange` (PR #69480)

2023-10-20 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/69480 From f75c2e75042d6d8f5a093967a56f3f59d7e541f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20Istv=C3=A1n=20Horv=C3=A1th?= <56926027+hob...@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:05:01 +0200 Subject

[clang] [clang] Correct end for the `CastOperation.OpRange` (PR #69480)

2023-10-20 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/69480 From f75c2e75042d6d8f5a093967a56f3f59d7e541f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20Istv=C3=A1n=20Horv=C3=A1th?= <56926027+hob...@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:05:01 +0200 Subject

[clang-tools-extra] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-19 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/69480 From f75c2e75042d6d8f5a093967a56f3f59d7e541f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20Istv=C3=A1n=20Horv=C3=A1th?= <56926027+hob...@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:05:01 +0200 Subject

[clang] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-18 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs created https://github.com/llvm/llvm-project/pull/69480 Set the correct end for the CastOperation.OpRange in CXXFunctionalCastExpr. Now it is the closing bracket's location instead of the parameter's location. This can lead to better highlight in the diagnostics. Sim