Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/lib/Sema/SemaDecl.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 8,003 Lines • ▼ Show 20 Lines | if (UnifySection(CodeSegStack.CurrentValue->getString(), | ||||
ASTContext::PSF_Read, | ASTContext::PSF_Read, | ||||
NewFD)) | NewFD)) | ||||
NewFD->dropAttr<SectionAttr>(); | NewFD->dropAttr<SectionAttr>(); | ||||
} | } | ||||
// Handle attributes. | // Handle attributes. | ||||
ProcessDeclAttributes(S, NewFD, D); | ProcessDeclAttributes(S, NewFD, D); | ||||
if (getLangOpts().CUDA) | |||||
maybeAddCUDAHostDeviceAttrs(S, NewFD, Previous); | |||||
if (getLangOpts().OpenCL) { | if (getLangOpts().OpenCL) { | ||||
// OpenCL v1.1 s6.5: Using an address space qualifier in a function return | // OpenCL v1.1 s6.5: Using an address space qualifier in a function return | ||||
// type declaration will generate a compilation error. | // type declaration will generate a compilation error. | ||||
unsigned AddressSpace = NewFD->getReturnType().getAddressSpace(); | unsigned AddressSpace = NewFD->getReturnType().getAddressSpace(); | ||||
if (AddressSpace == LangAS::opencl_local || | if (AddressSpace == LangAS::opencl_local || | ||||
AddressSpace == LangAS::opencl_global || | AddressSpace == LangAS::opencl_global || | ||||
AddressSpace == LangAS::opencl_constant) { | AddressSpace == LangAS::opencl_constant) { | ||||
Diag(NewFD->getLocation(), | Diag(NewFD->getLocation(), | ||||
▲ Show 20 Lines • Show All 7,034 Lines • Show Last 20 Lines |