https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
11happy wrote:
Are there any more changes for this PR required from my end?
Thank you
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -94,6 +94,7 @@ Deprecated Compiler Flags
Modified Compiler Flags
---
+- The `-Wreturn-type` flag has been modified to split some of its
functionality into `-Wreturn-mismatch` flag.
11happy wrote:
done
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
11happy
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
11happy wrote:
done
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wreturn-type -Wno-return-mismatch -fsyntax-only -verify %s
11happy wrote:
done
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
https://github.com/11happy updated
https://github.com/llvm/llvm-project/pull/82872
>From 557ee75d60f0fdb4dd2b353c819b4f22f71b46d7 Mon Sep 17 00:00:00 2001
From: 11happy
Date: Sat, 24 Feb 2024 13:50:30 +0530
Subject: [PATCH 1/3] add new flag -Wreturn-mismatch
Signed-off-by: 11happy
---
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
AaronBallman wrote:
When you add the other RUN line, it should use `-verify=return-type`.
```suggestion
// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch
@@ -94,6 +94,7 @@ Deprecated Compiler Flags
Modified Compiler Flags
---
+- The `-Wreturn-type` flag has been modified to split some of its
functionality into `-Wreturn-mismatch` flag.
AaronBallman wrote:
```suggestion
- Added a new
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wreturn-type -Wno-return-mismatch -fsyntax-only -verify %s
AaronBallman wrote:
Because this is the same test code in both files, let's remove this file, add
this RUN line to the other file, and rename the other file
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
AaronBallman
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s
+
+// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled.
+
+int foo(void) __attribute__((noreturn));
+int bar(void);
+
+void test1() {
+ return 1; //
@@ -1,5 +1,5 @@
// XFAIL: target=aarch64-pc-windows-msvc
-// RUN: %clang_cc1 -Wno-return-type -Wno-unused-value -emit-llvm %s -w -o - |
FileCheck %s
+// RUN: %clang_cc1 -Wno-return-type -Wno-return-mismatch -Wno-unused-value
-emit-llvm %s -w -o - | FileCheck %s
@@ -1,5 +1,5 @@
-// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-int-conversion
-Wno-strict-prototypes -Wno-tautological-constant-compare
-Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core
-std=gnu99 -analyzer-purge=none -verify %s
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only
-Wignored-qualifiers -Wno-error=return-type -Wno-error=implicit-int -verify
-fblocks -Wno-unreachable-code -Wno-unused-value -Wno-strict-prototypes
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9
https://github.com/11happy updated
https://github.com/llvm/llvm-project/pull/82872
>From 557ee75d60f0fdb4dd2b353c819b4f22f71b46d7 Mon Sep 17 00:00:00 2001
From: 11happy
Date: Sat, 24 Feb 2024 13:50:30 +0530
Subject: [PATCH 1/2] add new flag -Wreturn-mismatch
Signed-off-by: 11happy
---
@@ -1,5 +1,5 @@
-// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-int-conversion
-Wno-strict-prototypes -Wno-tautological-constant-compare
-Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core
-std=gnu99 -analyzer-purge=none -verify %s
@@ -1,5 +1,5 @@
// XFAIL: target=aarch64-pc-windows-msvc
-// RUN: %clang_cc1 -Wno-return-type -Wno-unused-value -emit-llvm %s -w -o - |
FileCheck %s
+// RUN: %clang_cc1 -Wno-return-type -Wno-return-mismatch -Wno-unused-value
-emit-llvm %s -w -o - | FileCheck %s
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only
-Wignored-qualifiers -Wno-error=return-type -Wno-error=implicit-int -verify
-fblocks -Wno-unreachable-code -Wno-unused-value -Wno-strict-prototypes
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman commented:
Thank you for the changes! Please be sure to add a release note to
`clang/docs/ReleaseNotes.rst` so users know about the new diagnostic flag, and
the changes should come with more test coverage. I'd like to see to see a test
with `-Wreturn-type
11happy wrote:
Its a Humble Ping!
https://github.com/llvm/llvm-project/pull/82872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Bhuminjay Soni (11happy)
Changes
**Overview:**
This pull request fixes #72116 where a new flag is introduced for
compatibility with GCC 14, the functionality of -Wreturn-type is modified to
split some of its behaviors into
https://github.com/11happy created
https://github.com/llvm/llvm-project/pull/82872
**Overview:**
This pull request fixes #72116 where a new flag is introduced for compatibility
with GCC 14, the functionality of -Wreturn-type is modified to split some of
its behaviors into -Wreturn-mismatch
33 matches
Mail list logo