@@ -298,15 +298,15 @@ void TypeInDeclRule::registerMatcher(MatchFinder &MF) {
298298 " dim3" , " cudaError" , " curandStatus" , " cublasStatus" , " CUstream" ,
299299 " CUstream_st" , " thrust::complex" , " thrust::device_vector" ,
300300 " thrust::device_ptr" , " thrust::device_reference" ,
301- " thrust::host_vector" , " cublasHandle_t" , " CUevent_st" , " __half " ,
302- " half " , " __half2 " , " half2 " , " cudaMemoryAdvise " , " cudaError_enum " ,
303- " cudaDeviceProp " , " cudaStreamCaptureStatus " ,
304- " cudaGraphExecUpdateResult " , " cudaPitchedPtr " ,
305- " thrust::counting_iterator " , " thrust::transform_iterator " ,
306- " thrust::permutation_iterator " , " thrust::iterator_difference " ,
307- " cusolverDnHandle_t " , " cusolverDnParams_t " , " gesvdjInfo_t " ,
308- " syevjInfo_t " , " thrust::device_malloc_allocator " ,
309- " thrust::divides " , thrustNamespace () + " tuple" , " thrust::maximum" ,
301+ " thrust::host_vector" , " cublasHandle_t" , " CUevent_st" ,
302+ " cudaMemoryAdvise " , " cudaError_enum " , " cudaDeviceProp " ,
303+ " cudaStreamCaptureStatus " , " cudaGraphExecUpdateResult " ,
304+ " cudaPitchedPtr " , " thrust::counting_iterator " ,
305+ " thrust::transform_iterator " , " thrust::permutation_iterator " ,
306+ " thrust::iterator_difference " , " cusolverDnHandle_t " ,
307+ " cusolverDnParams_t " , " gesvdjInfo_t " , " syevjInfo_t " ,
308+ " thrust::device_malloc_allocator " , " thrust::divides " ,
309+ thrustNamespace () + " tuple" , " thrust::maximum" ,
310310 " thrust::multiplies" , " thrust::plus" , " cudaDataType_t" ,
311311 " cudaError_t" , " CUresult" , " CUdevice" , " cudaEvent_t" ,
312312 " cublasStatus_t" , " cuComplex" , " cuFloatComplex" ,
@@ -330,8 +330,7 @@ void TypeInDeclRule::registerMatcher(MatchFinder &MF) {
330330 " cufftResult_t" , " cufftResult" , " cufftType_t" , " cufftType" ,
331331 thrustNamespace () + " pair" , " CUdeviceptr" , " cudaDeviceAttr" ,
332332 " CUmodule" , " CUjit_option" , " CUfunction" , " cudaMemcpyKind" ,
333- " cudaComputeMode" , " __nv_bfloat16" ,
334- " cooperative_groups::__v1::thread_group" ,
333+ " cudaComputeMode" , " cooperative_groups::__v1::thread_group" ,
335334 " cooperative_groups::__v1::thread_block" , " libraryPropertyType_t" ,
336335 " libraryPropertyType" , " cudaDataType_t" , " cudaDataType" ,
337336 " cublasComputeType_t" , " cublasAtomicsMode_t" , " cublasMath_t" ,
@@ -360,8 +359,8 @@ void TypeInDeclRule::registerMatcher(MatchFinder &MF) {
360359 " cublasLtMatrixTransformDesc_t" , " cudaGraphicsMapFlags" ,
361360 " cudaGraphicsRegisterFlags" , " cudaExternalMemoryHandleType" ,
362361 " cudaExternalSemaphoreHandleType" , " CUstreamCallback" ,
363- " cudaHostFn_t" , " __nv_half2 " , " __nv_half " , " cudaGraphNodeType " ,
364- " CUsurfref " , " CUdevice_P2PAttribute" , " cudaIpcMemHandle_t" ))))))
362+ " cudaHostFn_t" , " cudaGraphNodeType " , " CUsurfref " ,
363+ " CUdevice_P2PAttribute" , " cudaIpcMemHandle_t" ))))))
365364 .bind (" cudaTypeDef" ),
366365 this );
367366
@@ -1300,7 +1299,11 @@ void VectorTypeNamespaceRule::runRule(const MatchFinder::MatchResult &Result) {
13001299 if (!DpctGlobalInfo::isInCudaPath (RecDeclRepr->getBeginLoc ()))
13011300 return ;
13021301 }
1303-
1302+ auto TypePtr = TL ->getTypePtr ();
1303+ const auto *TT = dyn_cast<TypedefType>(TypePtr);
1304+ if (TT && !isRedeclInCUDAHeader (TT )) {
1305+ return ;
1306+ }
13041307 auto BeginLoc =
13051308 getDefinitionRange (TL ->getBeginLoc (), TL ->getEndLoc ()).getBegin ();
13061309
0 commit comments