diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2018-10-31 19:17:44 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2018-10-31 19:17:44 +0000 |
| commit | f8405bf46b6c936f17ab42848f29a13e77a51fc0 (patch) | |
| tree | 5d603f97dbc931fe3e88513913191a9d6fead1e5 | |
| parent | 44eba12b74a8da5f40a40b71f0e4650d555d30ee (diff) | |
| download | bcm5719-llvm-f8405bf46b6c936f17ab42848f29a13e77a51fc0.tar.gz bcm5719-llvm-f8405bf46b6c936f17ab42848f29a13e77a51fc0.zip | |
Removing a reliance on system headers from this test; NFC.
llvm-svn: 345766
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/readability-const-return-type.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-const-return-type.cpp b/clang-tools-extra/test/clang-tidy/readability-const-return-type.cpp index c2782be3a57..78557c5e652 100644 --- a/clang-tools-extra/test/clang-tidy/readability-const-return-type.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-const-return-type.cpp @@ -1,9 +1,16 @@ -// RUN: %check_clang_tidy %s readability-const-return-type %t -- -- -isystem +// RUN: %check_clang_tidy %s readability-const-return-type %t // p# = positive test // n# = negative test -#include <type_traits> +namespace std { +template< class T > +struct add_cv { typedef const volatile T type; }; + +template< class T> struct add_const { typedef const T type; }; + +template< class T> struct add_volatile { typedef volatile T type; }; +} const int p1() { // CHECK-MESSAGES: [[@LINE-1]]:1: warning: return type 'const int' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness |

