llvm-project/clang-tools-extra/clang-tidy
John Brawn 4d79ec7fe8 Reapply r276973 "Adjust Registry interface to not require plugins to export a registry"
This differs from the previous version by being more careful about template
instantiation/specialization in order to prevent errors when building with
clang -Werror. Specifically:
 * begin is not defined in the template and is instead instantiated when Head
   is. I think the warning when we don't do that is wrong (PR28815) but for now
   at least do it this way to avoid the warning.
 * Instead of performing template specializations in LLVM_INSTANTIATE_REGISTRY
   instead provide a template definition then do explicit instantiation. No
   compiler I've tried has problems with doing it the other way, but strictly
   speaking it's not permitted by the C++ standard so better safe than sorry.

Original commit message:

Currently the Registry class contains the vestiges of a previous attempt to
allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
plugin would have its own copy of a registry and export it to be imported by
the tool that's loading the plugin. This only works if the plugin is entirely
self-contained with the only interface between the plugin and tool being the
registry, and in particular this conflicts with how IR pass plugins work.

This patch changes things so that instead the add_node function of the registry
is exported by the tool and then imported by the plugin, which solves this
problem and also means that instead of every plugin having to export every
registry they use instead LLVM only has to export the add_node functions. This
allows plugins that use a registry to work on Windows if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.

llvm-svn: 277806
2016-08-05 11:01:08 +00:00
..
boost [clang-tidy] boost-use-to-string arg expr location bugfix 2016-06-28 08:16:20 +00:00
cert [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
cppcoreguidelines [clang-tidy] Fix segfault in cppcore-guidelines-special-member-functions check 2016-08-02 21:18:37 +00:00
google Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
llvm Fix clang-tidy patterns to adapt to newly added ExprWithCleanups nodes. 2016-06-21 20:11:20 +00:00
misc [clang-tidy] misc-argument-comment non-strict mode 2016-08-04 14:54:54 +00:00
modernize [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
mpi [extra-tools] Fix extra tools build bot warnings due to incorrect doc 2016-08-03 06:59:46 +00:00
performance [clang-tidy] Inefficient string operation 2016-08-03 23:06:03 +00:00
plugin [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
readability Sorting includes; NFC. 2016-07-29 21:41:18 +00:00
tool [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
utils [clang-tidy] Fixes to modernize-use-emplace 2016-07-29 02:10:23 +00:00
CMakeLists.txt [clang-tidy] MPITypeMismatchCheck 2016-08-02 20:29:35 +00:00
ClangTidy.cpp Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidy.h [clang-tidy] misc-argument-comment non-strict mode 2016-08-04 14:54:54 +00:00
ClangTidyDiagnosticConsumer.cpp Changes related to new implementation of tooling::Replacements as class. 2016-08-01 10:16:39 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyModule.cpp Apply performance-unnecessary-value-param to clang-tidy. 2016-06-15 15:46:10 +00:00
ClangTidyModule.h Revert "Apply modernize-use-default to clang-tools-extra." 2015-10-20 21:45:52 +00:00
ClangTidyModuleRegistry.h Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidyOptions.cpp [clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions. 2016-07-11 07:47:04 +00:00
ClangTidyOptions.h [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from. 2016-04-27 09:15:01 +00:00
add_new_check.py [clang-tidy] Remove redundant quote in add_new_check script 2016-05-30 15:42:08 +00:00
rename_check.py [clang-tidy] Python script for easy check rename 2015-10-11 07:58:34 +00:00