Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:22

0001 //===--- TypeTraits.h - clang-tidy-------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_TYPETRAITS_H
0010 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_TYPETRAITS_H
0011 
0012 #include "clang/AST/ASTContext.h"
0013 #include "clang/AST/Type.h"
0014 #include <optional>
0015 
0016 namespace clang::tidy::utils::type_traits {
0017 
0018 /// Returns `true` if `Type` is expensive to copy.
0019 std::optional<bool> isExpensiveToCopy(QualType Type, const ASTContext &Context);
0020 
0021 /// Returns `true` if `Type` is trivially default constructible.
0022 bool isTriviallyDefaultConstructible(QualType Type, const ASTContext &Context);
0023 
0024 /// Returns `true` if `RecordDecl` is trivially default constructible.
0025 bool recordIsTriviallyDefaultConstructible(const RecordDecl &RecordDecl,
0026                                            const ASTContext &Context);
0027 
0028 /// Returns `true` if `Type` is trivially destructible.
0029 bool isTriviallyDestructible(QualType Type);
0030 
0031 /// Returns true if `Type` has a non-trivial move constructor.
0032 bool hasNonTrivialMoveConstructor(QualType Type);
0033 
0034 /// Return true if `Type` has a non-trivial move assignment operator.
0035 bool hasNonTrivialMoveAssignment(QualType Type);
0036 
0037 } // namespace clang::tidy::utils::type_traits
0038 
0039 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_TYPETRAITS_H