summaryrefslogtreecommitdiff
path: root/test/Lexer/null-character-in-literal.c
blob: a479547536762e96405e1866f3a15b7429ca987e (plain)
ofshex dumpascii
0000 2f 2f 20 52 55 4e 3a 20 25 63 6c 61 6e 67 5f 63 63 31 20 2d 66 73 79 6e 74 61 78 2d 6f 6e 6c 79 //.RUN:.%clang_cc1.-fsyntax-only
0020 20 2d 76 65 72 69 66 79 20 25 73 0a 0a 2f 2f 20 54 68 69 73 20 66 69 6c 65 20 63 6f 6e 74 61 69 .-verify.%s..//.This.file.contai
0040 6e 73 20 6c 69 74 65 72 61 6c 20 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 73 2c 20 62 65 20 63 ns.literal.null.characters,.be.c
0060 61 72 65 66 75 6c 20 6e 6f 74 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 6d 0a 2f 2f 20 61 63 63 areful.not.to.remove.them.//.acc
0080 69 64 65 6e 74 61 6c 6c 79 2e 0a 0a 63 68 61 72 20 61 20 3d 20 27 00 27 3b 20 2f 2f 20 65 78 70 identally...char.a.=.'.';.//.exp
00a0 65 63 74 65 64 2d 77 61 72 6e 69 6e 67 20 7b 7b 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 28 73 ected-warning.{{null.character(s
00c0 29 20 70 72 65 73 65 72 76 65 64 20 69 6e 20 63 68 61 72 20 6c 69 74 65 72 61 6c 7d 7d 0a 63 68 ).preserved.in.char.literal}}.ch
00e0 61 72 20 62 20 3d 20 27 5c 00 27 3b 20 2f 2f 20 65 78 70 65 63 74 65 64 2d 77 61 72 6e 69 6e 67 ar.b.=.'\.';.//.expected-warning
0100 20 7b 7b 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 28 73 29 20 70 72 65 73 65 72 76 65 64 20 69 .{{null.character(s).preserved.i
0120 6e 20 63 68 61 72 20 6c 69 74 65 72 61 6c 7d 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f n.char.literal}}.............../
0140 2f 20 65 78 70 65 63 74 65 64 2d 77 61 72 6e 69 6e 67 40 2d 31 20 7b 7b 75 6e 6b 6e 6f 77 6e 20 /.expected-warning@-1.{{unknown.
0160 65 73 63 61 70 65 20 73 65 71 75 65 6e 63 65 20 27 5c 78 30 27 7d 7d 0a 0a 63 68 61 72 20 2a 63 escape.sequence.'\x0'}}..char.*c
0180 20 3d 20 22 6e 75 6c 6c 00 63 68 61 72 61 63 74 65 72 22 3b 20 2f 2f 20 65 78 70 65 63 74 65 64 .=."null.character";.//.expected
01a0 2d 77 61 72 6e 69 6e 67 20 7b 7b 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 28 73 29 20 70 72 65 -warning.{{null.character(s).pre
01c0 73 65 72 76 65 64 20 69 6e 20 73 74 72 69 6e 67 20 6c 69 74 65 72 61 6c 7d 7d 0a 63 68 61 72 20 served.in.string.literal}}.char.
01e0 2a 64 20 3d 20 22 6e 75 6c 6c 5c 00 63 68 61 72 61 63 74 65 72 22 3b 20 2f 2f 20 65 78 70 65 63 *d.=."null\.character";.//.expec
0200 74 65 64 2d 77 61 72 6e 69 6e 67 20 7b 7b 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 28 73 29 20 ted-warning.{{null.character(s).
0220 70 72 65 73 65 72 76 65 64 20 69 6e 20 73 74 72 69 6e 67 20 6c 69 74 65 72 61 6c 7d 7d 0a 20 20 preserved.in.string.literal}}...
0240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 78 70 ..........................//.exp
0260 65 63 74 65 64 2d 77 61 72 6e 69 6e 67 40 2d 31 20 7b 7b 75 6e 6b 6e 6f 77 6e 20 65 73 63 61 70 ected-warning@-1.{{unknown.escap
0280 65 20 73 65 71 75 65 6e 63 65 20 27 5c 78 30 27 7d 7d 0a 0a 2f 2f 20 50 75 74 20 62 72 6f 6b 65 e.sequence.'\x0'}}..//.Put.broke
02a0 6e 20 69 6e 63 6c 75 64 65 20 69 6e 20 74 68 65 20 65 6e 64 20 62 65 63 61 75 73 65 20 69 74 20 n.include.in.the.end.because.it.
02c0 73 75 70 70 72 65 73 73 65 73 20 73 75 62 73 65 71 75 65 6e 74 20 77 61 72 6e 69 6e 67 73 2e 0a suppresses.subsequent.warnings..
02e0 23 69 6e 63 6c 75 64 65 20 3c 6e 75 6c 6c 5c 00 63 68 61 72 61 63 74 65 72 3e 20 2f 2f 20 65 78 #include.<null\.character>.//.ex
0300 70 65 63 74 65 64 2d 77 61 72 6e 69 6e 67 20 7b 7b 6e 75 6c 6c 20 63 68 61 72 61 63 74 65 72 28 pected-warning.{{null.character(
0320 73 29 20 70 72 65 73 65 72 76 65 64 20 69 6e 20 73 74 72 69 6e 67 20 6c 69 74 65 72 61 6c 7d 7d s).preserved.in.string.literal}}
0340 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 78 ...........................//.ex
0360 70 65 63 74 65 64 2d 65 72 72 6f 72 40 2d 31 20 7b 7b 27 6e 75 6c 6c 5c 00 63 68 61 72 61 63 74 pected-error@-1.{{'null\.charact
0380 65 72 27 20 66 69 6c 65 20 6e 6f 74 20 66 6f 75 6e 64 7d 7d 0a er'.file.not.found}}.