]> granicus.if.org Git - clang/commitdiff
<rdar://problem/13559825> Further reduce template instantiation depth down to 256...
authorDouglas Gregor <dgregor@apple.com>
Mon, 8 Apr 2013 21:13:13 +0000 (21:13 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 8 Apr 2013 21:13:13 +0000 (21:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179057 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/LangOptions.def
lib/Frontend/CompilerInvocation.cpp

index 3de0107dff6d903b1105ebf9b352c148eed50c6a..b17dfbc9b520872055ef8f759e9dc9e7155fedcf 100644 (file)
@@ -156,7 +156,7 @@ ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
 ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
              "signed integer overflow handling")
 
-BENIGN_LANGOPT(InstantiationDepth, 32, 512
+BENIGN_LANGOPT(InstantiationDepth, 32, 256
                "maximum template instantiation depth")
 BENIGN_LANGOPT(ConstexprCallDepth, 32, 512,
                "maximum constexpr call depth")
index 41f941729a665b71ef865f745b99406d8e01e4d5..324b6e38306424e1a107027723b4987c1120331c 100644 (file)
@@ -1244,7 +1244,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
   Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
   Opts.MathErrno = Args.hasArg(OPT_fmath_errno);
-  Opts.InstantiationDepth = Args.getLastArgIntValue(OPT_ftemplate_depth, 512,
+  Opts.InstantiationDepth = Args.getLastArgIntValue(OPT_ftemplate_depth, 256,
                                                     Diags);
   Opts.ConstexprCallDepth = Args.getLastArgIntValue(OPT_fconstexpr_depth, 512,
                                                     Diags);