summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/DiagnosticOptions.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-20 07:18:24 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-20 07:18:24 +0000
commit575cf3791216c33770ba950430493cdd43099f8f (patch)
tree7daf7c81b0f30f5b5ba975d6a94f89a5dfe13d14 /include/clang/Frontend/DiagnosticOptions.h
parent40ab43b29bff9a240e5281e5952f59ddee623fca (diff)
Introduce a limit on the depth of the template instantiation backtrace
we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/DiagnosticOptions.h')
-rw-r--r--include/clang/Frontend/DiagnosticOptions.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/Frontend/DiagnosticOptions.h b/include/clang/Frontend/DiagnosticOptions.h
index d8ec14f9a3..797cb34023 100644
--- a/include/clang/Frontend/DiagnosticOptions.h
+++ b/include/clang/Frontend/DiagnosticOptions.h
@@ -39,7 +39,8 @@ public:
/// deserialized by, e.g., the CIndex library.
unsigned ErrorLimit; /// Limit # errors emitted.
-
+ unsigned TemplateBacktraceLimit; /// Limit depth of instantiation backtrace.
+
/// The distance between tab stops.
unsigned TabStop;
enum { DefaultTabStop = 8, MaxTabStop = 100 };
@@ -73,6 +74,7 @@ public:
VerifyDiagnostics = 0;
BinaryOutput = 0;
ErrorLimit = 0;
+ TemplateBacktraceLimit = 0;
}
};