llvm-project/clang-tools-extra/clang-tidy
Matthias Gehre 145dcef8bd [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName
Summary:
Before this PR, `modernize-use-using` would transform the typedef in
```
template <int A>
struct InjectedClassName {
  typedef InjectedClassName b;
};
```
into `using b = InjectedClassName<A>;` and
```
template <int>
struct InjectedClassNameWithUnnamedArgument {
  typedef InjectedClassNameWithUnnamedArgument b;
};
```
into `using b = InjectedClassNameWithUnnamedArgument<>;`.
The first fixit is surprising because its different than the code
before, but the second fixit doesn't even compile.

This PR adds an option to the TypePrinter to print InjectedClassNameType without
template parameters (i.e. as written).

Reviewers: aaron.ballman, alexfh, hokein, njames93

Subscribers: xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77979
2020-04-27 14:23:23 +02:00
..
abseil [clang-tidy] Use StringSwitch in a bunch of places. NFCI. 2020-04-26 17:24:47 +02:00
android [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
boost [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
bugprone [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
cert [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
cppcoreguidelines C++2a -> C++20 in some identifiers; NFC. 2020-04-21 15:37:19 -04:00
darwin [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
fuchsia [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
google [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
hicpp [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
linuxkernel [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
llvm [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
llvmlibc [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
misc [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
modernize [clang-tidy] modernize-use-using: Fix broken fixit with InjectedClassName 2020-04-27 14:23:23 +02:00
mpi [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
objc [clang-tidy] Add check to find calls to NSInvocation methods under ARC that don't have proper object argument lifetimes. 2020-04-10 08:51:21 -07:00
openmp [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
performance [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
plugin Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
portability [clang-tidy] Use StringSwitch in a bunch of places. NFCI. 2020-04-26 17:24:47 +02:00
readability [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
tool [clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py` 2020-04-23 11:36:50 +03:00
utils [libTooling] Simplify the representation of Transformer's RewriteRules. 2020-04-08 08:45:41 -04:00
zircon [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
CMakeLists.txt [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
ClangTidy.cpp [clang-tidy] Optional inheritance of file configs from parent directories 2020-04-15 06:41:31 -07:00
ClangTidy.h Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00
ClangTidyCheck.cpp [clang-tidy] Optional inheritance of file configs from parent directories 2020-04-15 06:41:31 -07:00
ClangTidyCheck.h [clang-tidy] Fix buildbot failing with explicit specialization in class scope 2020-04-07 21:30:29 +01:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Optional inheritance of file configs from parent directories 2020-04-15 06:41:31 -07:00
ClangTidyDiagnosticConsumer.h [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions 2020-03-29 15:19:13 -04:00
ClangTidyForceLinker.h [clang-tidy][NFC] Add missing check group docs and order entries 2020-03-23 11:05:34 +01:00
ClangTidyModule.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ClangTidyModule.h Return results by value from ClangTidyCheckFactories::createChecks 2019-09-26 13:55:01 +00:00
ClangTidyModuleRegistry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.cpp [clang-tidy] Optional inheritance of file configs from parent directories 2020-04-15 06:41:31 -07:00
ClangTidyOptions.h [clang-tidy] Optional inheritance of file configs from parent directories 2020-04-15 06:41:31 -07:00
ClangTidyProfiling.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
ClangTidyProfiling.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpandModularHeadersPPCallbacks.cpp Prune TargetInfo.h include from ParsedAttr.h, NFC 2020-03-11 20:47:11 -07:00
ExpandModularHeadersPPCallbacks.h Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
GlobList.cpp Refactor GlobList from an ad-hoc linked list to a vector 2019-08-27 10:56:13 +00:00
GlobList.h Refactor GlobList from an ad-hoc linked list to a vector 2019-08-27 10:56:13 +00:00
add_new_check.py [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section 2020-02-20 17:31:08 +00:00
rename_check.py [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section 2020-02-20 17:31:08 +00:00