-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[flang][test] Recognize !$acc and !$omp spelled with capital letters #118666
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
Conversation
If there are any continuation lines in the source, they will be printed using capital letters (at least in case of OpenMP). To avoid having them stripped out, recognize their spellings using capital letters as well.
@llvm/pr-subscribers-flang-semantics Author: Krzysztof Parzyszek (kparzysz) ChangesIf there are any continuation lines in the source, they will be printed using capital letters (at least in case of OpenMP). To avoid having them stripped out, recognize their spellings using capital letters as well. Full diff: https://github.com/llvm/llvm-project/pull/118666.diff 1 Files Affected:
diff --git a/flang/test/Semantics/test_symbols.py b/flang/test/Semantics/test_symbols.py
index 24dc5004a42293..98f3b61e78b949 100755
--- a/flang/test/Semantics/test_symbols.py
+++ b/flang/test/Semantics/test_symbols.py
@@ -29,7 +29,7 @@
# Strips out blank lines and all comments except for "!DEF:", "!REF:", "!$acc" and "!$omp"
with open(src, "r") as text_in:
for line in text_in:
- text = re.sub(r"!(?![DR]EF:|\$omp|\$acc).*", "", line)
+ text = re.sub(r"!(?![DR]EF:|\$[Oo][Mm][Pp]|\$[Aa][Cc][Cc]).*", "", line)
text = re.sub(r"^\s*$", "", text)
diff1 += text
|
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.
If there are any continuation lines in the source, they will be printed using capital letters (at least in case of OpenMP).
Who/what is printing them?
The unparser. I haven't dug too deep into it, I'm not sure why the first lines of the OpenMP directives are printed in lowercase for example, but if the line becomes too long it will show something like this in the output:
|
Co-authored-by: Michael Kruse <[email protected]>
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.
The unparser.
Could that be included in the summary/commit message?
Updated the commit description (it will become the commit message). |
If there are any continuation lines in the source, they will be printed by the unparser with capital letters (at least in case of OpenMP). To avoid having them stripped out, recognize their spellings using capital letters as well.