clang 20.0.0git
|
This file implements semantic analysis for CUDA constructs. More...
#include "clang/Sema/SemaCUDA.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/ExprCXX.h"
#include "clang/Basic/Cuda.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/Template.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/SmallVector.h"
#include <optional>
Go to the source code of this file.
Functions | |
template<typename AttrT > | |
static bool | hasExplicitAttr (const VarDecl *D) |
template<typename A > | |
static bool | hasAttr (const Decl *D, bool IgnoreImplicitAttr) |
template<typename AttrT > | |
static bool | hasImplicitAttr (const FunctionDecl *D) |
static bool | resolveCalleeCUDATargetConflict (CUDAFunctionTarget Target1, CUDAFunctionTarget Target2, CUDAFunctionTarget *ResolvedTarget) |
When an implicitly-declared special member has to invoke more than one base/field special member, conflicts may occur in the targets of these members. | |
template<typename AttrTy > | |
static void | copyAttrIfPresent (Sema &S, FunctionDecl *FD, const FunctionDecl &TemplateFD) |
This file implements semantic analysis for CUDA constructs.
Definition in file SemaCUDA.cpp.
|
static |
Definition at line 1053 of file SemaCUDA.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::getAttr().
Definition at line 111 of file SemaCUDA.cpp.
References D, clang::Decl::getAttrs(), and clang::Decl::hasAttrs().
Referenced by clang::ast_matchers::isInUnspecifiedPointerContext(), and clang::Type::isObjCInertUnsafeUnretainedType().
Definition at line 33 of file SemaCUDA.cpp.
References D, and clang::Decl::getAttr().
|
static |
Definition at line 306 of file SemaCUDA.cpp.
References D, clang::Decl::getAttr(), and clang::Decl::isImplicit().
|
static |
When an implicitly-declared special member has to invoke more than one base/field special member, conflicts may occur in the targets of these members.
For example, if one base's member host and another's is device, it's a conflict. This function figures out if the given targets
Target1 | and |
Target2 | conflict, and if they do not it fills in |
ResolvedTarget | with a target that resolves for both calls. |
Definition at line 352 of file SemaCUDA.cpp.
References clang::Global, and clang::HostDevice.
Referenced by clang::SemaCUDA::inferTargetForImplicitSpecialMember().