Do not process __fetch_builtin_* in cudaCall()

Fixes #205


[ROCm/clr commit: d5fd5e55c5]
This commit is contained in:
Chris Kitching
2017-10-17 15:30:38 +01:00
parent 2371dda65e
commit 07fb675fe7
@@ -814,7 +814,15 @@ void addAllMatchers(ast_matchers::MatchFinder &Finder, Cuda2HipCallback *Callbac
isExpansionInMainFile(),
callee(
functionDecl(
matchesName("cu.*")
matchesName("cu.*"),
unless(
// Clang generates structs with functions on them to represent things like
// threadIdx.x. We have other logic to handle those builtins directly, so
// we need to suppress the call-handling.
// We can't handle those directly in the call-handler without special-casing
// it unpleasantly, since the names of the functions are unique only per-struct.
matchesName("__fetch_builtin.*")
)
)
)
).bind("cudaCall"),