[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-20 Thread via cfe-commits
kelbon wrote: > LGTM, thank you! What's next? I cannot push changes https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > LGTM, thank you! > > What's next? I cannot push changes Thanks for mentioning that; I've pushed the changes on your behalf. Thank you for the improvements! https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits maili

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon created https://github.com/llvm/llvm-project/pull/78200 None >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (kelbon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/78200.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticGroups.td (+1) - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/2] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/3] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ba131b7017ce99d56a0584e630ed542d8cd48488 3c5e6bcb2295f142f37f9bbd0d7801b3c67c3593 --

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/4] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/2] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/3] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +el

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_pure_attr_on_cxx_constructor : Warning< + "constructor cannot be 'pure' (undefined behavior

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +el

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/4] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +el

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/5] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes should also come with a release note so users know about the improved diagnostics. https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_pure_attr_on_cxx_constructor : Warning< + "constructor cannot be 'pure' (undefined behavior

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread via cfe-commits
kelbon wrote: > The changes should also come with a release note so users know about the > improved diagnostics. Dont know how to do it, can you please reference what i need to do? > How about: '%select{pure|const}0' attribute applied to a function which > %select{returns 'void'|has no return

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > The changes should also come with a release note so users know about the > > improved diagnostics. > > Dont know how to do it, can you please reference what i need to do? Modify https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst to have a new e

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/6] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/7] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,16 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes greater restrictions than

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,16 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes greater restrictions than

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -560,7 +560,8 @@ Improvements to Clang's diagnostics - Clang now diagnoses unexpanded packs within the template argument lists of function template specializations. - Clang now diagnoses attempts to bind a bitfield to an NTTP of a reference type as erroneous converted co

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,16 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes greater restrictions than

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/8] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/9] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/10] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Aaron Ballman via cfe-commits
@@ -11792,6 +11792,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/11] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From e8c799b54c3e0b8088dbc19aaac0ef066baf136e Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/3] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From e8c799b54c3e0b8088dbc19aaac0ef066baf136e Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/4] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From e8c799b54c3e0b8088dbc19aaac0ef066baf136e Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/5] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From e8c799b54c3e0b8088dbc19aaac0ef066baf136e Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/6] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Chuanqi Xu via cfe-commits
@@ -11802,6 +11802,27 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread via cfe-commits
@@ -11802,6 +11802,27 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Chuanqi Xu via cfe-commits
@@ -11802,6 +11802,27 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/7] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/8] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/9] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-18 Thread Erich Keane via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -11801,6 +11801,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, +Funct

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_const_attr_with_pure_attr : Warning< + "'const' attribute imposes more restrictions, 'pure'

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -11801,6 +11801,26 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema &S, AaronBallman wrote: ```suggestion static

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/10] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/11] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/12] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From fb05243d0c0c3702b1615239a9337df337ad0c7c Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 01/13] add warning and test --- clang/include/clang/Basic/Diagnostic

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits