diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-09-22 02:21:54 +0000 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-09-22 02:21:54 +0000 |
commit | 31097581aad843ffb85befeeedb2e23a4d8cc287 (patch) | |
tree | bb169eaa18a5fcf9baef086f133e1c6d2bafa80a /clang/test/Parser/ms-inline-asm.c | |
parent | db0e7061c6b45357f83b121d6b97f67104288993 (diff) | |
download | bcm5719-llvm-31097581aad843ffb85befeeedb2e23a4d8cc287.tar.gz bcm5719-llvm-31097581aad843ffb85befeeedb2e23a4d8cc287.zip |
ms-inline-asm: Scope inline asm labels to functions
Summary:
This fixes PR20023. In order to implement this scoping rule, we piggy
back on the existing LabelDecl machinery, by creating LabelDecl's that
will carry the "internal" name of the inline assembly label, which we
will rewrite the asm label to.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4589
llvm-svn: 218230
Diffstat (limited to 'clang/test/Parser/ms-inline-asm.c')
-rw-r--r-- | clang/test/Parser/ms-inline-asm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Parser/ms-inline-asm.c b/clang/test/Parser/ms-inline-asm.c index 646f547e328..72c96c3715d 100644 --- a/clang/test/Parser/ms-inline-asm.c +++ b/clang/test/Parser/ms-inline-asm.c @@ -48,6 +48,9 @@ void t10() { void t11() { do { __asm mov eax, 0 __asm { __asm mov edx, 1 } } while(0); } +void t12() { + __asm jmp label // expected-error {{use of undeclared label 'label'}} +} int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 2 {{expected}} expected-note {{to match this}} |