[clang] Add new flag -Wreturn-mismatch (PR #82872)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 11:19:50 PST 2024


================
@@ -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 -Wno-error=return-type
-// 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 -verify %s -Wno-error=return-type
+// 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 -Wno-error=return-type -Wno-error=return-mismatch
----------------
AaronBallman wrote:

Why is this change needed? I would have assumed the `-Wno-error=return-type` would have been sufficient because `-Wreturn-mismatch` is grouped under it. (The same question applies to all the test changes.)

https://github.com/llvm/llvm-project/pull/82872


More information about the cfe-commits mailing list