-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Sema] Not report error when invalid intrinsic call is not used. #6140
Conversation
Move check for CalculateLevelOfDetail into DiagnoseTranslationUnit where call graph is available. Traverse all visited functions in call graph, diagnose illegal intrinsic call inside these functions. Fixes microsoft#5855
From reading the changes, I don't think the title of the PR matches what's being done. You are separating out the logic for identifying an error, and actually emitting a diagnostic. Maybe a better title would be: |
The implementation is updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also probably add a test that verifies the -Wno-error=
flag functionality (if it works). I don't think we have any tests running in tree that exercise that since we don't support the C++ tests.
-Wno-error= not work :( |
Can you file an issue for that? |
It works. Thought it does not work when hit lit test fail. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want to eventually move the derivatives requirements checks into a separate function, to simplify DiagnoseUsedHLSLMethodCall
when more checks are needed, but this is fine for now.
Added DiagnoseUsedHLSLMethodCall which only report error when the MethodCall is used.
DiagnoseUsedHLSLMethodCall is used in DiagnoseTranslationUnit.
In DiagnoseTranslationUnit, traverse all visited functions in call graph, diagnose illegal intrinsic call inside these functions.
Shader kind is also checked in DiagnoseUsedHLSLMethodCall.
Fixes #5855