Introduce option -Wargument-larger-than[=N] which warns about function definitions...
commit86053f558f16a3caf828ea367a9738a97edd524a
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 23:11:54 +0000 (17 23:11 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Wed, 17 Nov 2010 23:11:54 +0000 (17 23:11 +0000)
treedb6a848f7bc2bd18e2137862feafdb8612f34eea
parentbb0b07d30d3f4a8444d795ffac6f3f1b4d78a20d
Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
or return by-value any POD that is larger than some threshold (default is 64 bytes).

Implements rdar://8548050.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.h
include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
include/clang/Sema/Sema.h
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-argument-larger-than.cpp [new file with mode: 0644]