diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2016-03-22 13:44:36 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2016-03-22 13:44:36 +0000 |
| commit | 4c9c07414ea6a6cc76f3303baeabf737dcb6e267 (patch) | |
| tree | 2c2a75a61c273807c3a2bb8c177b96da1490b331 /clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp | |
| parent | 73a7bd3616d8ae6788256ce8fe8c5dcc351e9ecc (diff) | |
| download | bcm5719-llvm-4c9c07414ea6a6cc76f3303baeabf737dcb6e267.tar.gz bcm5719-llvm-4c9c07414ea6a6cc76f3303baeabf737dcb6e267.zip | |
Moving files that were placed in the wrong directory from r264049.
llvm-svn: 264050
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp')
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp new file mode 100644 index 00000000000..dd887758819 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg-delayed.cpp @@ -0,0 +1,28 @@ +// RUN: %check_clang_tidy %s modernize-redundant-void-arg %t -- -- -fdelayed-template-parsing + +int foo(void) { +// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: redundant void argument list in function definition [modernize-redundant-void-arg] +// CHECK-FIXES: {{^}}int foo() {{{$}} + return 0; +} + +template <class T> +struct MyFoo { + int foo(void) { +// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: redundant void argument list in function definition [modernize-redundant-void-arg] +// CHECK-FIXES: {{^}} int foo() {{{$}} + return 0; + } +}; +// Explicit instantiation. +template class MyFoo<int>; + +template <class T> +struct MyBar { + // This declaration isn't instantiated and won't be parsed 'delayed-template-parsing'. + int foo(void) { +// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: redundant void argument list in function definition [modernize-redundant-void-arg] +// CHECK-FIXES: {{^}} int foo() {{{$}} + return 0; + } +}; |

