[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>
+
+# Use invalid mangled name broken in function parameters
+# to check how -p or --no-params flag works.
+# If given we should demangle function name just fine,
+# if not given demangle should fail because of the invalid params.
----------------
jh7370 wrote:

```suggestion
# Use an invalid mangled name broken in the function parameters
# to check how -p or --no-params flag works.
# If the option is given we should be able to demangle function name just fine.
# If it is not given, demangling will fail because of the invalid params.
```
Please also reflow this comment to the standard column width (80 characters).

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


More information about the llvm-commits mailing list