llvm-project/clang-tools-extra/test/clang-tidy/infrastructure
Balazs Benics 0540485436 [libtooling][clang-tidy] Fix crashing on rendering invalid SourceRanges
Invalid SourceRanges can occur generally if the code does not compile,
thus we expect clang error diagnostics.
Unlike `clang`, `clang-tidy` did not swallow invalid source ranges, but
tried to highlight them, and blow various assertions.

The following two examples produce invalid source ranges, but this is
not a complete list:

  void test(x); // error: unknown type name 'x'
  struct Foo {
    member; // error: C++ requires a type specifier for all declarations
  };

Thanks @whisperity helping me fix this.

Reviewed-By: xazax.hun

Differential Revision: https://reviews.llvm.org/D114254
2021-11-29 09:56:43 +01:00
..
Inputs Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
alternative-fixes.cpp [clang-tidy] Added command line option `fix-notes` 2021-03-01 22:07:11 +00:00
basic.cpp Unbreak clang-tidy tests after D79599 / e9b4113902. 2020-05-08 12:37:33 -04:00
check_clang_tidy.cpp
clang-tidy-__clang_analyzer__macro.cpp
clang-tidy-diff.cpp
clang-tidy-enable-check-profile-one-tu.cpp
clang-tidy-enable-check-profile-two-tu.cpp
clang-tidy-mac-libcxx.cpp
clang-tidy-run-with-database.cpp
clang-tidy-store-check-profile-one-tu.cpp [Timer] On macOS count number of executed instructions 2021-02-11 17:26:37 +01:00
clean-up-code.cpp [clang-tidy] Added command line option `fix-notes` 2021-03-01 22:07:11 +00:00
config-file.cpp [clang-tidy] Ignore all spaces in the list of checks 2021-03-24 06:43:13 -07:00
config-files.cpp [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap 2020-07-30 10:31:13 +01:00
custom-diagnostics.cpp
deduplication.cpp
diagnostic.cpp
duplicate-conflicted-fixes-of-alias-checkers.cpp [clang-tidy][NFC] Update tests and Default options to use boolean value 2021-05-04 18:17:56 +01:00
duplicate-fixes-of-alias-checkers.cpp [clang-tidy] remove duplicate fixes of alias checkers 2020-06-19 20:40:59 +01:00
duplicate-reports.cpp [clang-tidy] remove duplicate fixes of alias checkers 2020-06-19 20:40:59 +01:00
empty-database.cpp Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
enable-alpha-checks.cpp
expand-modular-headers-ppcallbacks.cpp
explain-checks.cpp
export-diagnostics.cpp [libtooling][clang-tidy] Fix crashing on rendering invalid SourceRanges 2021-11-29 09:56:43 +01:00
export-relpath.cpp
extra-args.cpp
file-filter-symlinks.cpp
file-filter.cpp
fix-errors.cpp
fix.cpp
invalid-command-line.cpp [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
line-filter.cpp
list-checks.cpp
macros.cpp
nolint.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nolintbeginend-begin-at-eof.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-begin-global-end-specific.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nolintbeginend-begin-specific-end-global.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nolintbeginend-begin-without-end.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-end-at-sof.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-end-without-begin.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-error-within-include.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-mismatched-check-names.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nolintbeginend-mismatched-delims.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend-typo-in-check-name.cpp Revert 9b944c1843 with fixes 2021-09-29 08:00:45 -04:00
nolintbeginend.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nolintnextline.cpp [clang-tidy] Support globbing in NOLINT* expressions 2021-10-19 16:30:51 +00:00
nonstandard-file-extension.test
objc-arc-and-properties.m
objc-no-arc-or-properties.m
overlapping.cpp
pr37091.cpp [clang-tidy] fix debug-only test failure 2021-11-19 10:19:07 +01:00
read_file_config.cpp
remarks.cpp [clang-tidy] LIT test fix for Remark diagnostic 2021-06-11 02:02:36 -07:00
run-clang-tidy.cpp Revert "Extend tests of run-clang-tidy" 2020-10-19 10:37:22 -04:00
select-checks.cpp
serialize-diagnostics.cpp
static-analyzer-config.cpp
static-analyzer.cpp
temporaries.cpp
use-color.cpp Use ANSI escape codes for --use-color on Windows 2020-10-31 10:36:42 -04:00
validate-check-names.cpp
vfsoverlay.cpp
warnings-as-errors-diagnostics.cpp
warnings-as-errors-plural.cpp
warnings-as-errors.cpp