[clang-tools-extra] r345766 - Removing a reliance on system headers from this test; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 31 12:17:45 PDT 2018


Author: aaronballman
Date: Wed Oct 31 12:17:44 2018
New Revision: 345766

URL: http://llvm.org/viewvc/llvm-project?rev=345766&view=rev
Log:
Removing a reliance on system headers from this test; NFC.

Modified:
    clang-tools-extra/trunk/test/clang-tidy/readability-const-return-type.cpp

Modified: clang-tools-extra/trunk/test/clang-tidy/readability-const-return-type.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-const-return-type.cpp?rev=345766&r1=345765&r2=345766&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-const-return-type.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-const-return-type.cpp Wed Oct 31 12:17:44 2018
@@ -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




More information about the cfe-commits mailing list