[clang-tools-extra] r249612 - Fixing links and reformatting code; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 13:33:37 PDT 2015


Author: aaronballman
Date: Wed Oct  7 15:33:36 2015
New Revision: 249612

URL: http://llvm.org/viewvc/llvm-project?rev=249612&view=rev
Log:
Fixing links and reformatting code; NFC.

Patch by Marek Kurdej!

Modified:
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
    clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp
    clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp Wed Oct  7 15:33:36 2015
@@ -17,7 +17,7 @@ namespace clang {
 namespace tidy {
 
 void ProTypeConstCastCheck::registerMatchers(MatchFinder *Finder) {
-  if(!getLangOpts().CPlusPlus)
+  if (!getLangOpts().CPlusPlus)
     return;
 
   Finder->addMatcher(cxxConstCastExpr().bind("cast"), this);
@@ -30,4 +30,3 @@ void ProTypeConstCastCheck::check(const
 
 } // namespace tidy
 } // namespace clang
-

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h Wed Oct  7 15:33:36 2015
@@ -31,4 +31,3 @@ public:
 } // namespace clang
 
 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CONST_CAST_H
-

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp Wed Oct  7 15:33:36 2015
@@ -1,4 +1,4 @@
-//===--- ProTypeReinterpretCastCheck.cpp - clang-tidy--------------------------===//
+//===--- ProTypeReinterpretCastCheck.cpp - clang-tidy----------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -23,11 +23,11 @@ void ProTypeReinterpretCastCheck::regist
   Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this);
 }
 
-void ProTypeReinterpretCastCheck::check(const MatchFinder::MatchResult &Result) {
+void ProTypeReinterpretCastCheck::check(
+    const MatchFinder::MatchResult &Result) {
   const auto *MatchedCast =
       Result.Nodes.getNodeAs<CXXReinterpretCastExpr>("cast");
-  diag(MatchedCast->getOperatorLoc(),
-       "do not use reinterpret_cast");
+  diag(MatchedCast->getOperatorLoc(), "do not use reinterpret_cast");
 }
 
 } // namespace tidy

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h Wed Oct  7 15:33:36 2015
@@ -18,7 +18,7 @@ namespace tidy {
 /// Flags all occurrences of reinterpret_cast
 ///
 /// For the user-facing documentation see:
-/// http://clang.llvm.org/extra/clang-tidy/checks/misc-no-reinterpret-cast.html
+/// http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-pro-type-reinterpret-cast.html
 class ProTypeReinterpretCastCheck : public ClangTidyCheck {
 public:
   ProTypeReinterpretCastCheck(StringRef Name, ClangTidyContext *Context)

Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp Wed Oct  7 15:33:36 2015
@@ -1,6 +1,6 @@
 // RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-const-cast %t
 
-const int* i;
-int* j;
-void f() { j = const_cast<int*>(i); }
+const int *i;
+int *j;
+void f() { j = const_cast<int *>(i); }
 // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: do not use const_cast [cppcoreguidelines-pro-type-const-cast]

Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp?rev=249612&r1=249611&r2=249612&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp Wed Oct  7 15:33:36 2015
@@ -1,6 +1,6 @@
 // RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-reinterpret-cast %t
 
 int i = 0;
-void* j;
-void f() { j = reinterpret_cast<void*>(i); }
+void *j;
+void f() { j = reinterpret_cast<void *>(i); }
 // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]




More information about the cfe-commits mailing list