[all-commits] [llvm/llvm-project] 34b9b1: Disable -Wmissing-prototypes for internal linkage ...
David Blaikie via All-commits
all-commits at lists.llvm.org
Fri Mar 25 17:03:08 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 34b9b1ea4874b109b998d59a837f81f2f730001c
https://github.com/llvm/llvm-project/commit/34b9b1ea4874b109b998d59a837f81f2f730001c
Author: David Blaikie <dblaikie at gmail.com>
Date: 2022-03-25 (Fri, 25 Mar 2022)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/SemaCXX/anonymous-struct.cpp
M clang/test/SemaCXX/warn-missing-prototypes.cpp
Log Message:
-----------
Disable -Wmissing-prototypes for internal linkage functions that aren't explicitly marked "static"
Some functions can end up non-externally visible despite not being
declared "static" or in an unnamed namespace in C++ - such as by having
parameters that are of non-external types.
Such functions aren't mistakenly intended to be defining some function
that needs a declaration. They could be maybe more legible (except for
the operator new example) with an explicit static, but that's a
stylistic thing outside what should be addressed by a warning.
This reapplies 275c56226d7fbd6a4d554807374f78d323aa0c1c - once we figure
out what to do about the change in behavior for -Wnon-c-typedef-for-linkage
(this reverts the revert commit 85ee1d3ca1d06b6bd3477515b8d0c72c8df7c069)
Differential Revision: https://reviews.llvm.org/D121328
More information about the All-commits
mailing list