[all-commits] [llvm/llvm-project] 275c56: Disable -Wmissing-prototypes for internal linkage ...

David Blaikie via All-commits all-commits at lists.llvm.org
Mon Jan 31 17:35:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 275c56226d7fbd6a4d554807374f78d323aa0c1c
      https://github.com/llvm/llvm-project/commit/275c56226d7fbd6a4d554807374f78d323aa0c1c
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M clang/lib/Sema/SemaDecl.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.




More information about the All-commits mailing list