clang
23.0.0git
include
clang
ScalableStaticAnalysisFramework
Core
SummaryData
SummaryDataTraits.h
Go to the documentation of this file.
1
//===- SummaryDataTraits.h --------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Type traits for SummaryData subclasses.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_SUMMARYDATA_SUMMARYDATATRAITS_H
14
#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_SUMMARYDATA_SUMMARYDATATRAITS_H
15
16
#include "
clang/ScalableStaticAnalysisFramework/Core/Model/SummaryName.h
"
17
#include <type_traits>
18
19
namespace
clang::ssaf
{
20
21
/// Type trait that checks whether \p T has a static \c summaryName() method
22
/// returning \c SummaryName. Used to enforce the convention on SummaryData
23
/// subclasses at instantiation time.
24
///
25
/// The expression \c T::summaryName() is only well-formed for static methods —
26
/// calling a non-static member without an object is ill-formed and causes the
27
/// partial specialization to be discarded via SFINAE, so non-static overloads
28
/// are correctly rejected.
29
template
<
typename
T,
typename
=
void
>
30
struct
HasSummaryName
: std::false_type {};
31
32
template
<
typename
T>
33
struct
HasSummaryName
<T,
std
::void_t<decltype(T::summaryName())>>
34
: std::is_same<decltype(T::summaryName()), SummaryName> {};
35
36
}
// namespace clang::ssaf
37
38
#endif
// LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_SUMMARYDATA_SUMMARYDATATRAITS_H
SummaryName.h
clang::ssaf
Definition
UnsafeBufferUsage.h:18
std
Definition
__clang_cuda_cmath.h:361
clang::ssaf::HasSummaryName
Type trait that checks whether T has a static summaryName() method returning SummaryName.
Definition
SummaryDataTraits.h:30
Generated on
for clang by
1.14.0