summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-06-26 18:18:47 +0000
committerRichard Trieu <rtrieu@google.com>2012-06-26 18:18:47 +0000
commit918442398476a15808244f6e6ec95b9b48a886e5 (patch)
tree6e57b1e1003bd44b1f0386e24bbac1502d4d931e /clang/lib/Frontend/CompilerInvocation.cpp
parent18e3dfc5475763a381737fc6e39d88f062e7d69a (diff)
downloadbcm5719-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/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 8a95c80e49f..40328d42009 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1349,6 +1349,8 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.ShowSourceRanges = Args.hasArg(OPT_fdiagnostics_print_source_range_info);
Opts.ShowParseableFixits = Args.hasArg(OPT_fdiagnostics_parseable_fixits);
Opts.VerifyDiagnostics = Args.hasArg(OPT_verify);
+ Opts.ElideType = !Args.hasArg(OPT_fno_elide_type);
+ Opts.ShowTemplateTree = Args.hasArg(OPT_fdiagnostics_show_template_tree);
Opts.ErrorLimit = Args.getLastArgIntValue(OPT_ferror_limit, 0, Diags);
Opts.MacroBacktraceLimit
= Args.getLastArgIntValue(OPT_fmacro_backtrace_limit,
OpenPOWER on IntegriCloud