From: Aaron Ballman Date: Wed, 31 Oct 2018 19:17:44 +0000 (+0000) Subject: Removing a reliance on system headers from this test; NFC. X-Git-Tag: llvmorg-8.0.0-rc1~5320 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8405bf46b6c936f17ab42848f29a13e77a51fc0;p=platform%2Fupstream%2Fllvm.git Removing a reliance on system headers from this test; NFC. llvm-svn: 345766 --- 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 c2782be..78557c5 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 +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