aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/LangOptions.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-17 23:11:54 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-17 23:11:54 +0000
commit3532fdd1db8ff6f353f2a5b215cebe3e0e2ff3c2 (patch)
treedb6a848f7bc2bd18e2137862feafdb8612f34eea /include/clang/Basic/LangOptions.h
parentfdda17179047ff0b5e28cc777dc89ebc42f083cf (diff)
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
Diffstat (limited to 'include/clang/Basic/LangOptions.h')
-rw-r--r--include/clang/Basic/LangOptions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index fe69067a6d..558d6dc416 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -122,6 +122,8 @@ private:
public:
unsigned InstantiationDepth; // Maximum template instantiation depth.
+ unsigned ArgumentLargerThan; // Warn if parameter/return value is larger
+ // in bytes than this setting. 0 is no check.
// Version of Microsoft Visual C/C++ we are pretending to be. This is
// temporary until we support all MS extensions used in Windows SDK and stdlib
@@ -175,6 +177,8 @@ public:
InstantiationDepth = 1024;
+ ArgumentLargerThan = 0;
+
Optimize = 0;
OptimizeSize = 0;