diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-04 17:13:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-04 17:13:42 +0000 |
commit | 6c1cb9916e9988dcdd65b9266dbe24afd173427a (patch) | |
tree | 33c7cda7ab298eb3f73e629d4fb238dfbfede8a8 /include/clang/Frontend/DiagnosticOptions.h | |
parent | 6cdc161527a513f28dfc6f6ec27eb287f8268024 (diff) |
Introduce a limit on the depth of the macro instantiation backtrace
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.
This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/DiagnosticOptions.h')
-rw-r--r-- | include/clang/Frontend/DiagnosticOptions.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/Frontend/DiagnosticOptions.h b/include/clang/Frontend/DiagnosticOptions.h index 797cb34023..b4f147bde7 100644 --- a/include/clang/Frontend/DiagnosticOptions.h +++ b/include/clang/Frontend/DiagnosticOptions.h @@ -39,11 +39,15 @@ public: /// deserialized by, e.g., the CIndex library. unsigned ErrorLimit; /// Limit # errors emitted. + unsigned MacroBacktraceLimit; /// Limit depth of macro instantiation + /// backtrace. unsigned TemplateBacktraceLimit; /// Limit depth of instantiation backtrace. /// The distance between tab stops. unsigned TabStop; - enum { DefaultTabStop = 8, MaxTabStop = 100 }; + enum { DefaultTabStop = 8, MaxTabStop = 100, + DefaultMacroBacktraceLimit = 6, + DefaultTemplateBacktraceLimit = 10 }; /// Column limit for formatting message diagnostics, or 0 if unused. unsigned MessageLength; @@ -75,6 +79,7 @@ public: BinaryOutput = 0; ErrorLimit = 0; TemplateBacktraceLimit = 0; + MacroBacktraceLimit = 0; } }; |