Skip to content

[driver][test] Only check for unused plugin options #91522

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

Merged
merged 2 commits into from
May 9, 2024

Conversation

jakeegan
Copy link
Member

@jakeegan jakeegan commented May 8, 2024

This fixes matching clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument] on AIX.

This fixes matching `clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument]` on AIX.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels May 8, 2024
@llvmbot
Copy link
Member

llvmbot commented May 8, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Jake Egan (jakeegan)

Changes

This fixes matching clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument] on AIX.


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

1 Files Affected:

  • (modified) clang/test/Driver/plugin-driver-args.cpp (+2-2)
diff --git a/clang/test/Driver/plugin-driver-args.cpp b/clang/test/Driver/plugin-driver-args.cpp
index 6f0e6e2ba7525..7667cc4ce7b00 100644
--- a/clang/test/Driver/plugin-driver-args.cpp
+++ b/clang/test/Driver/plugin-driver-args.cpp
@@ -23,5 +23,5 @@
 
 // Plugins are only relevant for the -cc1 phase. No warning should be raised
 // when only using the assembler. See GH #88173.
-// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Werror -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM
-// CHECK-PLUGIN-ASM-NOT: argument unused during compilation
+// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Wunused-command-line-argument -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM
+// CHECK-PLUGIN-ASM-NOT: argument unused during compilation: '-f{{[a-z-]*-plugin[^']*}}'

Co-authored-by: Hubert Tong <[email protected]>
Copy link
Collaborator

@hubert-reinterpretcast hubert-reinterpretcast left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

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

Consider use a test tag, e.g. [Driver,test]

@jakeegan jakeegan changed the title [driver] Only check for unused plugin options [driver][test] Only check for unused plugin options May 9, 2024
@jakeegan
Copy link
Member Author

jakeegan commented May 9, 2024

CI failure doesn't seem to be related

@jakeegan jakeegan merged commit 4ad3de9 into llvm:main May 9, 2024
3 of 4 checks passed
@jakeegan jakeegan deleted the driver-args branch May 9, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants