llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[clang] Update expected test diagnostics to include matrices as accepted types

Open NeKon69 opened this issue 8 months ago • 5 comments

After #185304, some tests expect diagnostics that say that an argument "must be a scalar or vector of floating-point types". That message is now outdated for cases where matrices are also accepted, and should instead mention "scalar, vector, or matrix of floating-point types".

This affects not only the tests added in that PR, but also existing tests that rely on the older wording. Since the change in #185304 was made in the generic SemaChecking.cpp path rather than HLSL-specific code, the change affects not only HLSL tests that check the old diagnostic text.

NeKon69 avatar Mar 28 '26 07:03 NeKon69

@llvm/issue-subscribers-clang-frontend

Author: NeKon69

After #185304, some tests expect diagnostics that say that an argument "must be a scalar or vector of floating-point types". That message is now outdated for cases where matrices are also accepted, and should instead mention "scalar, vector, or matrix of floating-point types".

This affects not only the tests added in that PR, but also existing tests that rely on the older wording. Since the change in #185304 was made in the generic SemaChecking.cpp path rather than HLSL-specific code, the change affects not only HLSL tests that check the old diagnostic text.

Reopening because the PR that closed this issue was reverted.

kmpeng avatar Jul 28 '26 21:07 kmpeng

We need to do something more than just change the text of the diagnostic - not all languages that emit this diagnostic support matrices. Next step is to update the issue description with the plan.

damyanp avatar Aug 04 '26 17:08 damyanp

@farzonl - discussed in planning; min at this point is to figure out what we want to do for this, then we can decide if we're targeting September or later for it.

damyanp avatar Sep 21 '26 19:09 damyanp

I'm looking at the PR and the solution was already called out use an enum_select also we should not make this HLSL based for langopt but LangOpts.MatrixTypes

I'm setting this to days of work but it should really just be hours and the enum select should keep the number of test cases that need to be updated down.

farzonl avatar Oct 20 '26 14:10 farzonl