[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 30 12:59:26 PST 2025
https://github.com/Sirraide requested changes to this pull request.
I think there may be some code duplication here, so moving *some* of this code around *might* make sense, but I see a few issues with how this is done at the moment:
1. If we were to introduce new helpers, then instead of making a new header for this, these functions should just become member functions of the `Sema` class.
2. The new version of `CheckAllArgTypesAreCorrect()` is... way too complicated, in my opinion; I have trouble trying to figure out what two parameters that are a variant and a pair are supposed to mean from looking at the function, and it does feel like this function wants to be at least two or three separate functions...
I think a better approach would be to leave the HLSL functions alone and just factor out a separate helper and put it in `SemaSPIRV.cpp`, because as-is, this pr isn’t exactly simplifying things...
https://github.com/llvm/llvm-project/pull/125045
More information about the cfe-commits
mailing list