clang
6.0.0
|
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"
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) |
This file implements semantic analysis for CUDA constructs.
Definition in file SemaCUDA.cpp.
|
static |
Definition at line 887 of file SemaCUDA.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::getAttr().
|
static |
Definition at line 580 of file SemaCUDA.cpp.
References clang::Sema::CUDAKnownEmittedFns.
Referenced by clang::Sema::CUDADiagBuilder::~CUDADiagBuilder().
|
static |
Definition at line 695 of file SemaCUDA.cpp.
References clang::Sema::CUDADeferredDiags, clang::PartialDiagnostic::getDiagID(), clang::DiagnosticsEngine::getDiagnosticLevel(), clang::Sema::getDiagnostics(), and clang::DiagnosticsEngine::Warning.
Referenced by MarkKnownEmitted().
|
static |
Definition at line 97 of file SemaCUDA.cpp.
References clang::Decl::getAttrs(), and clang::Decl::hasAttrs().
|
static |
Definition at line 608 of file SemaCUDA.cpp.
References clang::Sema::CFT_Device, clang::Sema::CFT_Global, clang::Sema::CFT_Host, clang::Sema::CUDAKnownEmittedFns, clang::Sema::getASTContext(), clang::FunctionDecl::getDefinition(), clang::ASTContext::GetGVALinkageForFunction(), clang::Sema::getLangOpts(), clang::Sema::IdentifyCUDATarget(), clang::DeclContext::isDependentContext(), clang::isDiscardableGVALinkage(), and clang::T.
Referenced by clang::Sema::CheckCUDACall(), clang::Sema::CUDADiagIfDeviceCode(), clang::Sema::CUDADiagIfHostCode(), and MarkKnownEmitted().
|
static |
Definition at line 721 of file SemaCUDA.cpp.
References clang::C, clang::Sema::CUDACallGraph, clang::Sema::CUDAKnownEmittedFns, EmitDeferredDiags(), clang::Decl::getAsFunction(), and IsKnownEmitted().
Referenced by clang::Sema::CheckCUDACall().
|
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 244 of file SemaCUDA.cpp.
References clang::Sema::CFT_Global, and clang::Sema::CFT_HostDevice.
Referenced by clang::Sema::inferCUDATargetForImplicitSpecialMember().