Skip to content

Conversation

@tex3d
Copy link
Contributor

@tex3d tex3d commented Oct 16, 2024

The test clang/test/CodeGen/2004-02-20-Builtins.c will erroneously fail if "builtin" is in the path to your source tree.

This change adds a CHECK-LABEL !llvm.ident after the CHECK-NOT to avoid searching into the metadata containing the path.

The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously fail if "builtin" is in the path to your source tree.

This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to avoid searching into the metadata containing the path.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 16, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 16, 2024

@llvm/pr-subscribers-clang

Author: Tex Riddell (tex3d)

Changes

The test clang/test/CodeGen/2004-02-20-Builtins.c will erroneously fail if "builtin" is in the path to your source tree.

This change adds a CHECK-LABEL !llvm.ident after the CHECK-NOT to avoid searching into the metadata containing the path.


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

1 Files Affected:

  • (modified) clang/test/CodeGen/2004-02-20-Builtins.c (+3)
diff --git a/clang/test/CodeGen/2004-02-20-Builtins.c b/clang/test/CodeGen/2004-02-20-Builtins.c
index 13f970127d606a..4febe2fd30e1dd 100644
--- a/clang/test/CodeGen/2004-02-20-Builtins.c
+++ b/clang/test/CodeGen/2004-02-20-Builtins.c
@@ -3,6 +3,9 @@ double sqrt(double x);
 
 // CHECK-LABEL: @zsqrtxxx
 // CHECK-NOT: builtin
+// Don't search into metadata definitions.  !llvm.ident can contain the
+// substring "builtin" if it's in the source tree path.
+// CHECK-LABEL: !llvm.ident
 void zsqrtxxx(float num) {
    num = sqrt(num);
 }

Copy link
Contributor

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also consider checking for ret void instead, as that's more flexible if someone were to add another test case later in the file. This seems fine too though.

@tex3d tex3d merged commit 6582785 into llvm:main Oct 31, 2024
10 checks passed
@tex3d tex3d deleted the fix-check-not-builtin branch October 31, 2024 16:04
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
…12461)

The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously
fail if "builtin" is in the path to your source tree.

This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to
avoid searching into the metadata containing the path.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…12461)

The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously
fail if "builtin" is in the path to your source tree.

This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to
avoid searching into the metadata containing the path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants