hanchenye-llvm-project/clang/test/Misc
Reid Kleckner da30cff9ef [diagnostics] Avoid crashes while printing macro backtraces
When attempting to map a source into a given level of macro expansion,
this code was ignoring the possibility that the start and end of the
range might take wildly different paths through the tree of macro
expansions. It was assuming that the begin spelling location would
always precede the end spelling location, which is false. A macro can
easily transpose its arguments.

This also fixes a related issue where there are extra macro arguments
between the begin location and the end location. In this situation, we
now highlight the entire macro invocation.

Pair programmed with Richard Smith.

Fixes PR12818.

llvm-svn: 254981
2015-12-08 01:08:09 +00:00
..
Inputs
ast-dump-arm-attr.c Prune CRLF. 2014-10-27 12:37:26 +00:00
ast-dump-attr.cpp Do not crash when dumping the objc_bridge_related attribute when its optional arguments are not supplied. 2015-11-30 15:25:34 +00:00
ast-dump-color.cpp [modules] Add an assert for redeclarations that we never added to their redecl 2015-07-27 05:40:23 +00:00
ast-dump-comment.cpp
ast-dump-decl.c
ast-dump-decl.cpp Record correct source range for defaulted/deleted members. 2015-03-23 21:43:28 +00:00
ast-dump-decl.m
ast-dump-decl.mm
ast-dump-invalid.cpp Keep the IfStmt node even if the condition is invalid 2015-10-11 17:27:29 +00:00
ast-dump-lookups.cpp Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump 2014-08-11 22:11:07 +00:00
ast-dump-msp430-attr.c Prune CRLF. 2014-10-27 12:37:26 +00:00
ast-dump-stmt.c
ast-dump-stmt.cpp Fix -ast-dump of dependent new and delete exprs 2015-03-19 18:47:47 +00:00
ast-dump-stmt.m
ast-dump-templates.cpp
ast-dump-wchar.cpp
ast-print-objectivec.m Patch to wrap up '_' as separator in version numbers 2014-10-06 16:46:02 +00:00
ast-print-pragmas-xfail.cpp
ast-print-pragmas.cpp [ATTR] Automatic line feed after pragma-like attribute. 2015-10-12 06:59:48 +00:00
attr-source-range.cpp Prune CRLF. 2014-10-27 12:37:26 +00:00
backend-optimization-failure-nodbg.cpp Fix BackendConsumer::EmitOptimizationMessage() 2015-05-08 20:59:56 +00:00
backend-optimization-failure.cpp Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
backend-stack-frame-diagnostics-fallback.cpp
backend-stack-frame-diagnostics.cpp
caret-diags-macros.c [diagnostics] Avoid crashes while printing macro backtraces 2015-12-08 01:08:09 +00:00
caret-diags-scratch-buffer.c
cc1as-asm.s Fix the cc1as crash when it outputs assembly 2015-07-24 02:12:43 +00:00
dev-fd-fs.c
diag-aka-types.cpp PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared. 2015-07-16 01:06:17 +00:00
diag-format.c
diag-line-wrapping.cpp
diag-macro-backtrace.c
diag-macro-backtrace2.c Improve the printing of ranges when macros are involved. 2015-09-24 01:21:01 +00:00
diag-mapping.c
diag-mapping2.c
diag-presumed.c Stop printing macro backtraces that don't help diagnostics. 2015-08-12 18:24:59 +00:00
diag-special-chars.c Attempt to fix test from r225423 to get build bots green. 2015-01-08 02:40:08 +00:00
diag-template-diffing-color.cpp
diag-template-diffing-cxx98.cpp
diag-template-diffing.cpp Fix typo from r237482. "to reference of type" --> "to reference to type" 2015-05-16 01:39:39 +00:00
diag-trailing-null-bytes.cpp
diag-verify.cpp
diagnostic-crash.cpp
driver-verify.c
emit-html-insert.c
emit-html.c
error-limit-multiple-notes.cpp
error-limit.c
freebsd-arm-size_t.c
include-stack-for-note-flag.cpp
integer-literal-printing.cpp
interpreter.c Reenable Misc/interpreter.c as r239388 correctly handles such targets 2015-06-09 06:33:13 +00:00
languageOptsOpenCL.cl
macro-backtrace.c
message-length.c
permissions.cpp Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ 2015-07-15 20:04:18 +00:00
predefines.c
reduced-diags-macros-backtrace.cpp Stop printing macro backtraces that don't help diagnostics. 2015-08-12 18:24:59 +00:00
reduced-diags-macros.cpp Improve the printing of ranges when macros are involved. 2015-09-24 01:21:01 +00:00
remap-file.c
serialized-diags-driver.c Driver: Include driver diagnostics when we --serialize-diagnostics 2014-10-23 22:20:11 +00:00
serialized-diags-frontend.c
serialized-diags-no-category.c
serialized-diags-no-issue.c
serialized-diags-really-long-text.cpp [Frontend] Fix crash when serializing diagnostics with really long text. 2015-08-06 18:46:36 +00:00
serialized-diags-single-issue.c
serialized-diags-stable.c
serialized-diags.c Improve the printing of ranges when macros are involved. 2015-09-24 01:21:01 +00:00
serialized-diags.h
serialized-diags.m Correctly handle reading locations from serialized diagnostics 2014-10-10 22:20:26 +00:00
show-diag-options.c
tabstop.c
thinlto.c Recommit "Clang support for -flto=thin." 2015-10-15 20:35:53 +00:00
unnecessary-elipses.cpp
unprintable.c
verify.c
warn-in-system-header.c
warn-in-system-header.h
warn-sysheader.cpp
warning-flags-enabled.c Use %select to merge similar diagnostics. NFC 2015-11-14 02:09:55 +00:00
warning-flags-tree.c
warning-flags.c Use %select to merge similar diagnostics. NFC 2015-11-14 02:09:55 +00:00
win32-macho.c
working-directory.c
wrong-encoding.c
wrong-encoding2.c