[PATCH] D18919: [Clang-tidy] Add check "modernize use using"
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue May 3 00:53:25 PDT 2016
hokein accepted this revision.
hokein added a comment.
LGTM with some nits.
================
Comment at: clang-tidy/modernize/UseUsingCheck.cpp:22
@@ +21,3 @@
+void UseUsingCheck::registerMatchers(MatchFinder *Finder) {
+ if (!getLangOpts().CPlusPlus)
+ return;
----------------
Should be CplusPlus11 here.
================
Comment at: test/clang-tidy/modernize-use-using.cpp:28
@@ +27,3 @@
+class Class {
+ typedef long long Type;
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use using instead of typedef
----------------
code indentation.
================
Comment at: test/clang-tidy/modernize-use-using.cpp:29
@@ +28,3 @@
+ typedef long long Type;
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use using instead of typedef
+ // CHECK-FIXES: using Type = long long;
----------------
The same.
================
Comment at: test/clang-tidy/modernize-use-using.cpp:44
@@ +43,3 @@
+class Test {
+ typedef typename T::iterator Iter;
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use using instead of typedef
----------------
The same.
Repository:
rL LLVM
http://reviews.llvm.org/D18919
More information about the cfe-commits
mailing list