Looks like modernize-use-using suggest to replace type from template parameters with actual type passed to template. To reproduce run check over LLVM code base with -header-filter=".*" and search include/llvm/ADT/SmallPtrSet.h:237:3.
Other encountered problem: namespace is inserted when template is located in llvm namespace. include/llvm/Support/CommandLine.h:478:3: warning: use 'using' instead of 'typedef' [modernize-use-using] typedef StringRef WrapperType; ^ using WrapperType = llvm::StringRef
Constants defined in enum is replaced with actual value in fix-it: tools/clang/include/clang/Basic/AddressSpaces.h:45:1: warning: use 'using' instead of 'typedef' [modernize-use-using] typedef unsigned Map[Count]; ^ using Map = unsigned int [7]
There is also other thing that Krystyna told me about: It gives many warnings when you use some macro that uses typedefs inside like the ones in gtest. Perhaps there it should warn about ones in macros only when some special option is enabled.
Piotr, do you know whether Krystyna is planning to work on this?
We don't work together because she is moving to another city. I remember that she said that she is planning to fix it sometime, but I don't think it will be in next 2 months. I know she is not doing any work right now.
I'm planning to fix this, but I do not have possibility to do it before second half of September because I do not have a good computer right now.
Krystyna, thank you for the information! I'm assigning the issue to you then. Feel free to unassign, if you realize that you're not going to work on this.
Another problem: typedef.cpp:1:1: warning: use 'using' instead of 'typedef' [modernize-use-using] typedef struct foo_s { int i; } * foo_t; ^ using foo_t = struct foo_s * I'd expect the fixit to create this: struct foo_s { int i; }; using foo_t = foo_s *;
(In reply to comment #8) > Another problem: > > typedef.cpp:1:1: warning: use 'using' instead of 'typedef' > [modernize-use-using] > typedef struct foo_s { int i; } * foo_t; > ^ > using foo_t = struct foo_s * > > I'd expect the fixit to create this: > > struct foo_s { int i; }; > using foo_t = foo_s *; I've added a workaround for this in r292918. Actually, it would be more convenient to have a separate bug for each of these issues with isolated and reduced test cases.
Please file a separate bug with a corresponding isolated test case for each of these issues.
(In reply to comment #0) > Looks like modernize-use-using suggest to replace type from template > parameters with actual type passed to template. > > To reproduce run check over LLVM code base with -header-filter=".*" and > search include/llvm/ADT/SmallPtrSet.h:237:3. I was not able to reproduce this problem. In the line 280 (which was previously 237 line) code: template<typename PtrTy> class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { public: typedef PtrTy reference; } is changed to: template<typename PtrTy> class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { public: using reference = PtrTy; } Can you try to reproduce this error once again and open a bug if you find it?
Alexander did some fixes in r292918. May be this problem was fixed there?
Solutions for some bugs in https://reviews.llvm.org/D29262 Remaining bug is now in: https://llvm.org/bugs/show_bug.cgi?id=31793