Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…_const_argument` matchers to using `getWriteRange` [Synopsis] + The wrapping macro `checkErrors` on the function call `cudaMallocHost` leads to `Skipped some replacements` and the absence of any hipification. [IMP] + As for the particular `cudaMallocHost`, it has two versions: `C`-version with two arguments (the first argument is `void**`) and the templated `C++`-version with three arguments (the first argument is `T **`, where T is `template<class T>`, and the third argument is the default argument). + In the second case, clang reports three arguments (the third is empty) despite there is no explicit third argument in the function call. As a workaround solution, change the position of the adding argument in the matcher for `cudaMallocHost` from 2 to 3, which is treated as `add an argument at the end of the argument list`. [Solution] + Took into account possible macro expansions by starting to use the function getWriteRange for all `e_add_const_argument` matchers (including `cudaMallocHost`). + Provided the corresponding test `cudaMallocHost.cu` [ToDo] + Revise all the rest matchers and switch them to using `getWriteRange` AMAP. + Try to provide more detailed diagnostics for matchers (besides `Skipped some replacements`).
- Loading branch information