Skip to content
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

[test] Avoid libc dep in Update warn-unsafe-buffer-usage-warning-data… #79183

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

dklimkin
Copy link
Member

Avoid libc dep in warn-unsafe-buffer-usage-warning-data-invocation.

To keep the test hermetic. This is in line with other existing declarations in the file that avoid includes.

…-invocation

To keep the test hermetic. This is in line with other existing declarations in the file that avoid includes.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 23, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 23, 2024

@llvm/pr-subscribers-clang

Author: Danial Klimkin (dklimkin)

Changes

Avoid libc dep in warn-unsafe-buffer-usage-warning-data-invocation.

To keep the test hermetic. This is in line with other existing declarations in the file that avoid includes.


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

1 Files Affected:

  • (modified) clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp (+2-1)
diff --git a/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp b/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp
index 574afcd0eb6dce3..5c9df12513e521a 100644
--- a/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp
+++ b/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp
@@ -7,7 +7,6 @@
 // RUN: %clang_cc1 -std=c++20 -fblocks -include %s %s 2>&1 | FileCheck --allow-empty %s
 // CHECK-NOT: [-Wunsafe-buffer-usage]
 
-#include <stdint.h>
 #ifndef INCLUDED
 #define INCLUDED
 #pragma clang system_header
@@ -15,6 +14,8 @@
 // no spanification warnings for system headers
 #else
 
+typedef __INTPTR_TYPE__ intptr_t;
+
 namespace std {
   class type_info;
   class bad_cast;

@durin42 durin42 merged commit 5a7d68c into llvm:main Jan 23, 2024
4 of 5 checks passed
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.

None yet

3 participants