1 RUN: llvm-cxxfilt -n < %s | FileCheck --match-full-lines %s
7 _RNvCshGpAVYOtgW1_5hello4rust
19 CHECK: crate::{closure#0}
22 CHECK: crate::{closure#1}
25 CHECK: crate::{closure:foo#0}
28 CHECK: crate::{closure:foo#1}
33 CHECK: crate::{shim:reify#0}
36 ; Unrecognized special namespace
38 CHECK: crate::{Z:ident#10}
62 ; Generic type arguments
67 CHECK: generic::<_, _>
70 CHECK: generic::<_, _, _>
73 ; Generic const arguments
75 CHECK: generic_const::<_>
76 _RIC13generic_constKpE
78 ; Generic lifetime arguments
80 CHECK: generic_lifetime::<'_>
81 _RIC16generic_lifetimeL_E
83 ; Invalid lifetime index.
85 CHECK: _RIC16generic_lifetimeL0_E
86 _RIC16generic_lifetimeL0_E
111 CHECK: basic::<isize>
114 CHECK: basic::<usize>
153 ; Named types. Test possible paths productions.
161 CHECK: named::<<_ as Name>>
162 _RIC5namedXC5cratepC4NameE
164 CHECK: named::<<_ as Name>>
167 CHECK: named::<name::Name>
168 _RIC5namedNvC4name4NameE
170 CHECK: named::<Name<>>
175 CHECK: types::<[u8; 0]>
187 CHECK: types::<(_, _)>
190 CHECK: types::<(_, _, _)>
199 CHECK: types::<&mut _>
202 CHECK: types::<&mut _>
205 CHECK: types::<*const _>
208 CHECK: types::<*mut _>
211 ; Function signatures
213 CHECK: function::<fn()>
216 CHECK: function::<fn() -> _>
219 CHECK: function::<fn(_)>
222 CHECK: function::<fn(_, _)>
225 CHECK: function::<fn(_, _, _)>
228 CHECK: function::<unsafe fn()>
231 CHECK: function::<extern "C" fn()>
234 CHECK: function::<extern "cdecl" fn()>
235 _RIC8functionFK5cdeclEuE
237 CHECK: function::<unsafe extern "C-cmse-nonsecure-call" fn()>
238 _RIC8functionFUK21C_cmse_nonsecure_callEuE
240 ; Invalid ABI with punycode.
242 CHECK: _RIC8functionFKu3n3hEuE
243 _RIC8functionFKu3n3hEuE
250 CHECK: trait::<dyn for<'a> >
253 CHECK: trait::<for<'a> fn(dyn for<'b> + 'a)>
254 _RIC5traitFG_DG_EL0_EuE
256 CHECK: trait::<dyn Display>
257 _RIC5traitDC7DisplayEL_E
259 CHECK: trait::<dyn Display + Send + Sync>
260 _RIC5traitDC7DisplayC4SendC4SyncEL_E
262 CHECK: trait::<dyn for<'a> Display>
263 _RIC5traitDG_C7DisplayEL_E
265 CHECK: trait::<dyn IntoIterator<_, Item = _>>
266 _RIC5traitDIC12IntoIteratorpEp4ItempEL_E
268 CHECK: trait::<dyn IntoIterator<Item = _>>
269 _RIC5traitDC12IntoIteratorp4ItempEL_E
271 CHECK: trait::<dyn IntoIterator<Item = _, IntoIter = _>>
272 _RIC5traitDC12IntoIteratorp4Itempp8IntoIterpEL_E
274 ; Invalid trait object, missing lifetime.
281 CHECK: binders::<for<'a> fn(&'a _)>
282 _RIC7bindersFG_RL0_pEuE
284 CHECK: binders::<for<'a> fn(&'a mut _)>
285 _RIC7bindersFG_QL0_pEuE
287 CHECK: binders::<for<'a, 'b> fn(&'a _, &'b _)>
288 _RIC7bindersFG0_RL1_pRL0_pEuE
290 CHECK: binders::<for<'a, 'b> fn() -> for<'c, 'd> fn(&'a _, &'d _)>
291 _RIC7bindersFG0_EFG0_RL3_pRL0_pEuE
293 CHECK: binders::<for<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z1, 'z2, 'z3, 'z4> fn(&'a &'b &'c &'d &'e &'f &'g &'h &'i &'j &'k &'l &'m &'n &'o &'p &'q &'r &'s &'t &'u &'v &'w &'x &'y &'z &'z1 &'z2 &'z3 &'z4 ())>
294 _RIC7bindersFGs_RLt_RLs_RLr_RLq_RLp_RLo_RLn_RLm_RLl_RLk_RLj_RLi_RLh_RLg_RLf_RLe_RLd_RLc_RLb_RLa_RL9_RL8_RL7_RL6_RL5_RL4_RL3_RL2_RL1_RL0_uEuE
296 ; Invalid binder. Too many bound lifetimes.
298 CHECK: _RIC7bindersFGFF_EuE
301 ; Integer constants. Test value demangling.
312 CHECK: integer::<-15>
315 CHECK: integer::<-16>
318 CHECK: integer::<18446744073709551615>
319 _RIC7integerKoffffffffffffffff_E
321 CHECK: integer::<0x10000000000000000>
322 _RIC7integerKo10000000000000000_E
324 CHECK: integer::<-0x123456789abcdef01>
325 _RIC7integerKnn123456789abcdef01_E
327 ; Invalid integer constant without any digits:
329 CHECK: _RIC7integerKi_E
332 ; Invalid integer constants with insignificant leading zeros:
334 CHECK: _RIC7integerKi00_E
337 CHECK: _RIC7integerKi01_E
340 ; Integer constants. Test all integer types.
386 ; Invalid bool constants
388 CHECK: _RIC4boolKb2_E
391 CHECK: _RIC4boolKbn0_E
417 CHECK: char::<'\u{1f40d}'>
420 CHECK: char::<'\u{10ffff}'>
423 ; Invalid char constants
425 CHECK: _RIC4charKc1234567_E
430 CHECK: backref::<backref::ident>
431 _RIC7backrefNvB0_5identE
433 CHECK: backref::<(), ()>
436 CHECK: backref::<7, 7>
437 _RIC7backrefKi7_KBa_E
439 ; Invalid backreferences
450 CHECK: _RIC7backrefSB9_E
453 CHECK: _RIC7backrefKBa_E
458 CHECK: dot (.llvm.1234)
461 CHECK: dot (.llvm.6789)
462 _RC3dotC5crate.llvm.6789
467 _RNvC8punycodeu7_1lqs71d
469 CHECK: punycode::zażółć_gęślą_jaźń
470 _RNvC8punycodeu29za_gl_ja_w3a7psa2tqtgb10airva
472 CHECK: punycode::საჭმელად_გემრიელი_სადილი
473 _RNvC8punycodeu30____7hkackfecea1cbdathfdh9hlq6y
475 CHECK: Gödel::Escher::Bach
476 _RNtNvCu8Gdel_5qa6Escher4Bach
479 _RNvC8punycodeu7wn8hx1g
481 ; Punycode - invalid code point
489 CHECK: _RNvC1au25zzzzzzzzzzzzzzzzzzzzzzzzz
490 _RNvC1au25zzzzzzzzzzzzzzzzzzzzzzzzz
492 ; Punycode - early EOF
494 CHECK: _RCu8_CCCAR_u4
497 ; Punycode - overflow
499 CHECK: _RNvC1au21p18888888888888888888
500 _RNvC1au21p18888888888888888888
502 ; Invalid mangled characters
510 ; Invalid namespace (not in [a-zA-Z]).
512 CHECK: _RN_C5crate4main
515 ; Invalid identifier length (UINT64_MAX + 3, which happens to be ok after a wraparound).
517 CHECK: _RNvC2ab18446744073709551618xy
518 _RNvC2ab18446744073709551618xy
520 ; Mangling scheme includes an optional encoding version. When present it would
521 ; indicate an encoding we don't support yet. Check that it is rejected: