diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2016-04-14 19:28:13 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2016-04-14 19:28:13 +0000 |
| commit | b602ee7d8f857c9896b2e799fe3b79a2a619f62d (patch) | |
| tree | d14ef09c2acba28bcc86e51a97d41edfc1b3e93d /clang-tools-extra/test/clang-tidy | |
| parent | c9157d35d9e4a82c92ed7942e8be58b67cb8da2b (diff) | |
| download | bcm5719-llvm-b602ee7d8f857c9896b2e799fe3b79a2a619f62d.tar.gz bcm5719-llvm-b602ee7d8f857c9896b2e799fe3b79a2a619f62d.zip | |
Add support for type aliases to modernize-redundant-void-arg.cpp
Patch by Clement Courbet.
llvm-svn: 266358
Diffstat (limited to 'clang-tools-extra/test/clang-tidy')
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp index d913929caad..ea4b75f6433 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp @@ -39,6 +39,12 @@ typedef int (*returns_fn_void_int_t(void))(void); // CHECK-MESSAGES: :[[@LINE-2]]:44: warning: {{.*}} in typedef // CHECK-FIXES: {{^}}typedef int (*returns_fn_void_int_t())();{{$}} +// Should work for type aliases as well as typedef. +using returns_fn_void_int_t2 = int (*(void))(void); +// CHECK-MESSAGES: :[[@LINE-1]]:39: warning: {{.*}} in type alias +// CHECK-MESSAGES: :[[@LINE-2]]:46: warning: {{.*}} in type alias +// CHECK-FIXES: {{^}}using returns_fn_void_int_t2 = int (*())();{{$}} + int (*returns_fn_void_int(void))(void) { // CHECK-MESSAGES: :[[@LINE-1]]:27: warning: {{.*}} in function definition // CHECK-MESSAGES: :[[@LINE-2]]:34: warning: {{.*}} in function definition |

