[flang-commits] [flang] [flang][test] Recognize !$acc and !$omp spelled with capital letters (PR #118666)

via flang-commits flang-commits at lists.llvm.org
Wed Dec 4 09:06:24 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-semantics

Author: Krzysztof Parzyszek (kparzysz)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/118666.diff


1 Files Affected:

- (modified) flang/test/Semantics/test_symbols.py (+1-1) 


``````````diff
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
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/118666


More information about the flang-commits mailing list