[flang-commits] [flang] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

via flang-commits flang-commits at lists.llvm.org
Wed Sep 13 03:37:01 PDT 2023


================
@@ -0,0 +1,95 @@
+//===--- MoveSmartPointerContentsCheck.cpp - clang-tidy -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <string>
+
+<<<<<<< HEAD
+#include "MoveSmartPointerContentsCheck.h"
+#include "../utils/Matchers.h"
+#include "../utils/OptionsUtils.h"
+=======
+#include "../utils/Matchers.h"
+#include "../utils/OptionsUtils.h"
+#include "MoveSmartPointerContentsCheck.h"
+>>>>>>> b0179a7f3cac ([clang-tidy] Add performance-move-smart-pointer-contents check.)
+#include "clang/AST/ASTContext.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
+
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::performance {
+
+bool MoveSmartPointerContentsCheck::isLanguageVersionSupported(
+    const LangOptions &LangOptions) const {
+  if (!LangOptions.CPlusPlus) {
+    return false;
+  }
----------------
martinboehme wrote:

If you're checking for `CPlusPlus11` anyway, I believe this is redundant.

https://github.com/llvm/llvm-project/pull/66139


More information about the flang-commits mailing list