diff options
author | Richard Trieu <rtrieu@google.com> | 2012-06-26 18:18:47 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-06-26 18:18:47 +0000 |
commit | 918442398476a15808244f6e6ec95b9b48a886e5 (patch) | |
tree | 6e57b1e1003bd44b1f0386e24bbac1502d4d931e /clang/lib/Frontend/Warnings.cpp | |
parent | 18e3dfc5475763a381737fc6e39d88f062e7d69a (diff) | |
download | bcm5719-llvm-918442398476a15808244f6e6ec95b9b48a886e5.tar.gz bcm5719-llvm-918442398476a15808244f6e6ec95b9b48a886e5.zip |
Add template type diffing to Clang. This feature will provide a better
comparison between two templated types when they both appear in a diagnostic.
Type elision will remove indentical template arguments, which can be disabled
with -fno-elide-type. Cyan highlighting is applied to the differing types.
For more formatting, -fdiagnostic-show-template-tree will output the template
type as an indented text tree, with differences appearing inline. Template
tree works with or without type elision.
llvm-svn: 159216
Diffstat (limited to 'clang/lib/Frontend/Warnings.cpp')
-rw-r--r-- | clang/lib/Frontend/Warnings.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Frontend/Warnings.cpp b/clang/lib/Frontend/Warnings.cpp index 24b7acacfde..b7d4a3b9253 100644 --- a/clang/lib/Frontend/Warnings.cpp +++ b/clang/lib/Frontend/Warnings.cpp @@ -53,7 +53,11 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, Diags.setIgnoreAllWarnings(Opts.IgnoreWarnings); Diags.setShowOverloads( static_cast<DiagnosticsEngine::OverloadsShown>(Opts.ShowOverloads)); - + + Diags.setElideType(Opts.ElideType); + Diags.setPrintTemplateTree(Opts.ShowTemplateTree); + Diags.setShowColors(Opts.ShowColors); + // Handle -ferror-limit if (Opts.ErrorLimit) Diags.setErrorLimit(Opts.ErrorLimit); |