[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 12:22:39 PST 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

I'm a bit worried that this manual parsing technique will need fixing again in the future, but I think this is at least a reasonable incremental improvement.

LGTM with a minor nit.



================
Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:54
+      }
+      NestingLevel++;
+      break;
----------------
Might as well use `++NestingLevel` given that you don't care about the result anyway. Similar below.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:197
+
+typedef S<(0 > 0), int> S_t, *S_p;
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
----------------
I was going to suggest another test involving attributes (which can have arbitrary expressions as arguments to the attribute), but then I discovered attributes in Clang are broken in the place where it would be an issue for this check anyway. :-D (I filed https://bugs.llvm.org/show_bug.cgi?id=43939 to address the attribute issue.)




Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67460/new/

https://reviews.llvm.org/D67460





More information about the cfe-commits mailing list