llvm-project/clang-tools-extra/clang-tidy
Haojian Wu f7692a2792 [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database.
Summary:
The clang-tidy will trigger an assertion if it's not in the building directory.

TEST:
cd <llvm-repo>/
./build/bin/clang-tidy --checks=-*,modernize-use-nullptr -p build tools/clang/tools/extra/clang-tidy/ClangTidy.cpp

The crash issue is gone after applying this patch.

Fixes PR24834, PR26241

Reviewers: bkramer, alexfh

Subscribers: rizsotto.mailinglist, cfe-commits

Differential Revision: http://reviews.llvm.org/D17335

llvm-svn: 261991
2016-02-26 09:19:33 +00:00
..
cert Add a new check, cert-env33-c, that diagnoses uses of system(), popen(), and _popen() to execute a command processor. This check corresponds to the CERT secure coding rule: https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=2130132 2016-02-22 16:01:06 +00:00
cppcoreguidelines [clang-tidy] ClangTidy check to flag uninitialized builtin and pointer fields. 2016-02-15 04:27:56 +00:00
google [clang-tidy] update links to Google Code Style in docs 2016-02-25 14:31:10 +00:00
llvm Remove autoconf support 2016-01-26 21:31:36 +00:00
misc [clang-tidy] Added a check for forward declaration in the potentially wrong namespace 2016-02-24 13:35:32 +00:00
modernize [clang-tidy] Another attempt to fix MSVC build 2016-02-25 00:39:11 +00:00
performance [clang-tidy] Only invoke ForRangeCopyCheck on expensive-to-copy types. 2016-02-15 03:36:23 +00:00
readability Add a new check, readability-redundant-string-init, that checks unnecessary string initializations. 2016-02-25 23:57:23 +00:00
tool [clang-tidy] Reformatted docs + minor updates 2016-02-08 00:19:29 +00:00
utils [clang-tdiy] Add header file extension configuration support. 2016-02-05 11:23:59 +00:00
CMakeLists.txt [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy 2015-12-30 10:24:40 +00:00
ClangTidy.cpp [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database. 2016-02-26 09:19:33 +00:00
ClangTidy.h [clang-tdiy] Add header file extension configuration support. 2016-02-05 11:23:59 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database. 2016-02-26 09:19:33 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Fix a crash issue when clang-tidy runs with compilation database. 2016-02-26 09:19:33 +00:00
ClangTidyModule.cpp [clang-tidy] Default options in modules. 2014-10-16 11:27:57 +00:00
ClangTidyModule.h Revert "Apply modernize-use-default to clang-tools-extra." 2015-10-20 21:45:52 +00:00
ClangTidyModuleRegistry.h [clang-tidy] Fixed header guards using clang-tidy llvm-header-guard check. NFC. 2015-03-09 16:52:33 +00:00
ClangTidyOptions.cpp Teach clang-tidy how to upgrade warnings into errors. 2016-01-13 17:36:41 +00:00
ClangTidyOptions.h Teach clang-tidy how to upgrade warnings into errors. 2016-01-13 17:36:41 +00:00
add_new_check.py [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables. 2016-01-29 15:54:26 +00:00
rename_check.py [clang-tidy] Python script for easy check rename 2015-10-11 07:58:34 +00:00