[clang] [clang][OpenMP] Add explicit default libomp value to test. (PR #221098)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 3 16:54:59 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: cmtice

<details>
<summary>Changes</summary>

The test OMPInvariantPredicateBoundOnIntraTileLoop, in AttrTest.cpp uses '-fopenmp' without supplying an explcit value. In some places the default value is 'libomp', which works just fine for this test. But in envorinments where 'libomp' is not the default value (e.g. places that use 'libgomp' by default) the test fails. This fixes that issue by explicitly telling the test to use 'libomp'.

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


1 Files Affected:

- (modified) clang/unittests/AST/AttrTest.cpp (+1-1) 


``````````diff
diff --git a/clang/unittests/AST/AttrTest.cpp b/clang/unittests/AST/AttrTest.cpp
index 56096054dd267..33cc5c491db93 100644
--- a/clang/unittests/AST/AttrTest.cpp
+++ b/clang/unittests/AST/AttrTest.cpp
@@ -315,7 +315,7 @@ TEST(Attr, OMPInvariantPredicateBoundOnIntraTileLoop) {
             body(i);
         }
       )cpp",
-      {"-fopenmp"});
+      {"-fopenmp=libomp"});
   ASSERT_TRUE(AST);
 
   auto GetHint = [&AST](const char *FuncName) {

``````````

</details>


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


More information about the cfe-commits mailing list