clang  6.0.0svn
Functions
SemaCUDA.cpp File Reference

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

#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/ExprCXX.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/Template.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
Include dependency graph for SemaCUDA.cpp:

Go to the source code of this file.

Functions

template<typename A >
static bool hasAttr (const FunctionDecl *D, bool IgnoreImplicitAttr)
 
static bool resolveCalleeCUDATargetConflict (Sema::CUDAFunctionTarget Target1, Sema::CUDAFunctionTarget Target2, Sema::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. More...
 
static void EmitCallStackNotes (Sema &S, FunctionDecl *FD)
 
static bool IsKnownEmitted (Sema &S, FunctionDecl *FD)
 
static void EmitDeferredDiags (Sema &S, FunctionDecl *FD)
 
static void MarkKnownEmitted (Sema &S, FunctionDecl *OrigCaller, FunctionDecl *OrigCallee, SourceLocation OrigLoc)
 
template<typename AttrTy >
static void copyAttrIfPresent (Sema &S, FunctionDecl *FD, const FunctionDecl &TemplateFD)
 

Detailed Description

This file implements semantic analysis for CUDA constructs.

Definition in file SemaCUDA.cpp.

Function Documentation

◆ copyAttrIfPresent()

template<typename AttrTy >
static void copyAttrIfPresent ( Sema S,
FunctionDecl FD,
const FunctionDecl TemplateFD 
)
static

◆ EmitCallStackNotes()

static void EmitCallStackNotes ( Sema S,
FunctionDecl FD 
)
static

◆ EmitDeferredDiags()

static void EmitDeferredDiags ( Sema S,
FunctionDecl FD 
)
static

◆ hasAttr()

template<typename A >
static bool hasAttr ( const FunctionDecl D,
bool  IgnoreImplicitAttr 
)
static

Definition at line 97 of file SemaCUDA.cpp.

References clang::Decl::getAttrs(), and clang::Decl::hasAttrs().

◆ IsKnownEmitted()

static bool IsKnownEmitted ( Sema S,
FunctionDecl FD 
)
static

◆ MarkKnownEmitted()

static void MarkKnownEmitted ( Sema S,
FunctionDecl OrigCaller,
FunctionDecl OrigCallee,
SourceLocation  OrigLoc 
)
static

◆ resolveCalleeCUDATargetConflict()

static bool resolveCalleeCUDATargetConflict ( Sema::CUDAFunctionTarget  Target1,
Sema::CUDAFunctionTarget  Target2,
Sema::CUDAFunctionTarget ResolvedTarget 
)
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

Parameters
Target1and
Target2conflict, and if they do not it fills in
ResolvedTargetwith a target that resolves for both calls.
Returns
true if there's a conflict, false otherwise.

Definition at line 244 of file SemaCUDA.cpp.

References clang::Sema::CFT_Global, and clang::Sema::CFT_HostDevice.

Referenced by clang::Sema::inferCUDATargetForImplicitSpecialMember().