llvm-project/clang-tools-extra/clangd
Nathan James 39c4246e1e [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck
Summary:
Motivated by [[ https://bugs.llvm.org/show_bug.cgi?id=45045 | Tune inspections to a specific C++ standard. ]]
Moves the isLanguageVersionSupported virtual function from `MakeSmartPtrCheck` to the base `ClangTidyCheck` class.
This will disable registering matchers or pp callbacks on unsupported language versions for a check.
Having it as a standalone function is cleaner than manually disabling the check in the register function and should hopefully
encourage check developers to actually restrict the check based on language version.
As an added bonus this could enable automatic detection of what language version a check runs on for the purpose of documentation generation

Reviewers: aaron.ballman, gribozavr2, Eugene.Zelenko, JonasToth, alexfh, hokein

Reviewed By: gribozavr2

Subscribers: xazax.hun, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75289
2020-02-28 13:05:05 +00:00
..
benchmarks Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
clients/clangd-vscode [clangd] Bump vscode-clangd v0.0.20 2020-01-30 11:45:54 +01:00
fuzzer Fix the clangd-fuzzer build error. 2020-02-26 10:13:13 +01:00
include-mapping [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
index [clangd] Bump index version number. 2020-02-26 13:43:16 +01:00
indexer Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
refactor [clangd] Get rid of lexer usage in ObjCLocalizeStringLiteral tweak 2020-02-28 09:38:26 +01:00
test [clangd] Migrate Lexer usages in TypeHierarchy to TokenBuffers 2020-02-25 15:36:45 +01:00
tool [clangd] Expose the rename LimitFiles option to the C++ API, NFC. 2020-02-26 09:33:58 +01:00
unittests [clangd] Get rid of getBeginningOfIdentifier helper 2020-02-27 09:34:45 +01:00
xpc Fix clangd-xpc-test-client build after 777180a32b 2020-01-28 19:48:31 -05:00
AST.cpp [clangd] Get rid of lexer usage in AST.cpp 2020-02-27 09:54:21 +01:00
AST.h [clangd] Get rid of lexer usage in AST.cpp 2020-02-27 09:54:21 +01:00
CMakeLists.txt Reland "[clang-tools-extra] fix the check for if '-latomic' is necessary"" 2020-02-17 16:53:29 +00:00
CSymbolMap.inc [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
Cancellation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cancellation.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangdLSPServer.cpp [clangd] Expose the rename LimitFiles option to the C++ API, NFC. 2020-02-26 09:33:58 +01:00
ClangdLSPServer.h [clangd] Expose the rename LimitFiles option to the C++ API, NFC. 2020-02-26 09:33:58 +01:00
ClangdServer.cpp [clangd] Expose the rename LimitFiles option to the C++ API, NFC. 2020-02-26 09:33:58 +01:00
ClangdServer.h [clangd] Expose the rename LimitFiles option to the C++ API, NFC. 2020-02-26 09:33:58 +01:00
CodeComplete.cpp [clangd] Update the CompletionItemKind. 2020-02-14 15:48:30 +01:00
CodeComplete.h [clangd] Expose completion range in code completion results (C++ API) 2020-02-11 15:25:03 +01:00
CodeCompletionStrings.cpp Code completion should not ignore default parameters in functions. 2019-08-07 16:52:21 +00:00
CodeCompletionStrings.h [clangd] Place cursor better after completing patterns 2019-05-28 15:33:37 +00:00
CollectMacros.h [clangd] Inactive regions support as an extension to semantic highlighting 2019-11-21 19:40:55 -05:00
CompileCommands.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CompileCommands.h [clangd] Try to fix CompileCommandsTests on windows. NFC 2019-12-06 12:28:01 +01:00
Compiler.cpp [clangd] Log cc1 args at verbose level. 2019-11-29 11:00:01 +01:00
Compiler.h [clang] Add `forceReload` clangd extension to 'textDocument/didChange' 2020-02-10 14:02:02 -05:00
Context.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Context.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Diagnostics.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Diagnostics.h [NFC] Fix typos in Clangd and Clang 2019-12-16 10:54:40 +01:00
DraftStore.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
DraftStore.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpectedTypes.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ExpectedTypes.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FS.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FS.h [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase 2019-07-18 16:13:23 +00:00
FSProvider.cpp [clangd] Don't mmap source files on all platforms --> don't crash on git checkout 2020-01-29 19:44:14 +01:00
FSProvider.h [clangd] Don't mmap source files on all platforms --> don't crash on git checkout 2020-01-29 19:44:14 +01:00
Features.inc.in [clangd] XPC transport layer 2019-01-16 00:24:22 +00:00
FileDistance.cpp [clangd] Save an unnecessary copy, NFC. 2019-09-24 13:25:38 +00:00
FileDistance.h Move endian constant from Host.h to SwapByteOrder.h, prune include 2019-10-19 00:48:11 +00:00
FindSymbols.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
FindSymbols.h [clangd] Type hierarchy subtypes 2019-06-16 02:31:37 +00:00
FindTarget.cpp [clangd] Fix the incomplete template specialization in findTarget. 2020-02-21 09:42:02 +01:00
FindTarget.h [clangd] targetDecl() returns only NamedDecls. 2020-01-03 18:18:40 +01:00
Format.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Format.h [clangd] Revamp textDocument/onTypeFormatting. 2019-06-10 14:26:21 +00:00
FormattedString.cpp [clangd] Add a ruler after header in hover 2020-01-15 15:54:38 +01:00
FormattedString.h [clangd] Add a ruler after header in hover 2020-01-15 15:54:38 +01:00
Function.h [clangd] Remove Bind, use C++14 lambda captures instead. NFC 2019-08-16 09:20:01 +00:00
FuzzyMatch.cpp [clangd] Tune the fuzzy-matching algorithm 2019-03-15 14:00:49 +00:00
FuzzyMatch.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalCompilationDatabase.cpp [clangd] Log directory when a CDB is loaded 2020-01-30 12:15:04 +01:00
GlobalCompilationDatabase.h [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. 2019-12-06 09:47:03 +01:00
HeaderSourceSwitch.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
HeaderSourceSwitch.h [clangd] Implement a smart version of HeaderSource switch. 2019-09-30 10:48:02 +00:00
Headers.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Headers.h [clangd][NFC] Typo in comment 2019-07-30 20:39:39 +00:00
Hover.cpp [clangd] Get rid of getBeginningOfIdentifier helper 2020-02-27 09:34:45 +01:00
Hover.h [clangd] Introduce paragraph, the first part of new rendering structs 2019-12-13 09:58:55 +01:00
IncludeFixer.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
IncludeFixer.h [clangd] Compute scopes eagerly in IncludeFixer 2019-08-06 11:37:50 +00:00
JSONTransport.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Logger.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Logger.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ParsedAST.cpp [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck 2020-02-28 13:05:05 +00:00
ParsedAST.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Path.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PathMapping.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
PathMapping.h [clangd] Add path mappings functionality 2020-01-07 12:40:51 +01:00
Preamble.cpp [clangd] Improve long and confusing preamble log message. 2019-11-16 17:13:02 +01:00
Preamble.h [clangd] Collect macros in the preamble region of the main file 2019-09-24 11:14:06 +00:00
Protocol.cpp [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
Protocol.h [clangd] Add add commit characters to the server capabilities 2020-02-19 08:32:00 +01:00
Quality.cpp [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
Quality.h [clangd] Remove unused signature help quality signal. NFC 2019-06-06 08:32:25 +00:00
QueryDriverDatabase.cpp [clangd] Preserve -nostdinc and --sysroot when calling query driver 2020-02-05 09:58:06 +01:00
RIFF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RIFF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Selection.cpp [clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails. 2020-02-23 20:17:30 +01:00
Selection.h [clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails. 2020-02-23 20:17:30 +01:00
SemanticHighlighting.cpp [clangd] Add C++20 concepts support to findExplicitReferences() and semantic highlighting 2020-01-23 15:11:46 -05:00
SemanticHighlighting.h [clangd] Add C++20 concepts support to findExplicitReferences() and semantic highlighting 2020-01-23 15:11:46 -05:00
SemanticSelection.cpp [clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails. 2020-02-23 20:17:30 +01:00
SemanticSelection.h Implement semantic selections. 2019-09-16 11:29:35 +00:00
Shutdown.cpp Include <cstdlib> for std::abort() in clangd 2020-01-24 20:52:37 +01:00
Shutdown.h Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
SourceCode.cpp [clangd] Use tokenize instead of raw lexer in SourceCode/lex 2020-02-28 09:38:26 +01:00
SourceCode.h [clangd] Get rid of getBeginningOfIdentifier helper 2020-02-27 09:34:45 +01:00
StdSymbolMap.inc [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
TUScheduler.cpp [Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and all NUMA groups 2020-02-14 10:24:22 -05:00
TUScheduler.h Reland "[clangd] Mechanism to make update debounce responsive to rebuild speed." 2020-02-04 17:17:53 +01:00
Threading.cpp [clangd] Increase stack size of the new threads on macOS 2020-02-04 15:21:27 +01:00
Threading.h [clangd] Remove obsolete includes. NFC 2019-09-04 10:01:05 +00:00
Trace.cpp [clangd] Remove obsolete includes. NFC 2019-09-04 10:01:05 +00:00
Trace.h NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
Transport.h [NFC] Fix typos in Clangd and Clang 2019-12-16 10:54:40 +01:00
URI.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
URI.h [clangd] Simplify the callside of URI::resolve, NFC. 2019-09-23 14:39:37 +00:00
XRefs.cpp [clangd] Clean-up XRefs.cpp from Lexer usages and unnecessary SourceLoc transformations 2020-02-26 17:51:27 +01:00
XRefs.h Revert "Revert "[clangd] Implement "textDocument/documentLink" protocol support"" 2020-01-02 16:36:21 +01:00