[llvm] [llvm-cxxfilt] Added the option --no-params (PR #75348)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 01:55:52 PST 2023


================
@@ -0,0 +1,17 @@
+RUN: llvm-cxxfilt             _Z3fooIiJEEvf _ZN1f2baC2ERKNS_2baIT_EE _ZN2baC2EOT0_ | FileCheck %s --check-prefix=CHECK-PARAMS
+RUN: llvm-cxxfilt          -p _Z3fooIiJEEvf _ZN1f2baC2ERKNS_2baIT_EE _ZN2baC2EOT0_ | FileCheck %s --check-prefix=CHECK-NO-PARAMS
+RUN: llvm-cxxfilt --no-params _Z3fooIiJEEvf _ZN1f2baC2ERKNS_2baIT_EE _ZN2baC2EOT0_ | FileCheck %s --check-prefix=CHECK-NO-PARAMS
+
+CHECK-PARAMS: void foo<int>(float)
+CHECK-NO-PARAMS: foo<int>
----------------
jh7370 wrote:

Always check to make sure your test fails without the change. Because of the way FileCheck works, if you removed --no-params from the command-line, this test would still pass. This is because FileCheck just looks for substrings in the full output. You'll want to add --match-full-lines to your FileCheck arguments, and probably --strict-whitespace too. NB: if you do this, you'll need to remove the space after the colon on these pattern lines.

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


More information about the llvm-commits mailing list