clang: lib/Sema/SemaCUDA.cpp File Reference (original) (raw)

This file implements semantic analysis for CUDA constructs. More...

#include "[clang/Sema/SemaCUDA.h](SemaCUDA%5F8h%5Fsource.html)"
#include "[clang/AST/ASTContext.h](ASTContext%5F8h%5Fsource.html)"
#include "[clang/AST/Decl.h](Decl%5F8h%5Fsource.html)"
#include "[clang/AST/ExprCXX.h](ExprCXX%5F8h%5Fsource.html)"
#include "[clang/Basic/Cuda.h](include%5F2clang%5F2Basic%5F2Cuda%5F8h%5Fsource.html)"
#include "[clang/Basic/TargetInfo.h](include%5F2clang%5F2Basic%5F2TargetInfo%5F8h%5Fsource.html)"
#include "[clang/Lex/Preprocessor.h](Preprocessor%5F8h%5Fsource.html)"
#include "[clang/Sema/Lookup.h](Sema%5F2Lookup%5F8h%5Fsource.html)"
#include "[clang/Sema/ScopeInfo.h](ScopeInfo%5F8h%5Fsource.html)"
#include "[clang/Sema/Sema.h](Sema%5F8h%5Fsource.html)"
#include "[clang/Sema/Template.h](Template%5F8h%5Fsource.html)"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/SmallVector.h"
#include <optional>

Go to the source code of this file.

Functions
template
static bool hasExplicitAttr (const VarDecl *D)
template
static bool hasAttr (const Decl *D, bool IgnoreImplicitAttr)
template
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
static void copyAttrIfPresent (Sema &S, FunctionDecl *FD, const FunctionDecl &TemplateFD)

This file implements semantic analysis for CUDA constructs.

Definition in file SemaCUDA.cpp.

copyAttrIfPresent()

template

hasAttr()

template

static bool hasAttr ( const Decl * D, bool IgnoreImplicitAttr ) static

hasExplicitAttr()

template

static bool hasExplicitAttr ( const VarDecl * D) static

hasImplicitAttr()

template

resolveCalleeCUDATargetConflict()

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

Parameters

Target1 and
Target2 conflict, and if they do not it fills in
ResolvedTarget with a target that resolves for both calls.

Returns

true if there's a conflict, false otherwise.

Definition at line 350 of file SemaCUDA.cpp.

References clang::Global, and clang::HostDevice.

Referenced by clang::SemaCUDA::inferTargetForImplicitSpecialMember().