Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Sema / caret-diags-register-variable.cpp
blobc2d2fbe0c581ae261968fbc6efb9d4ad2708491e
1 // RUN: not %clang_cc1 -triple i386-pc-linux-gnu -std=c++11 -fsyntax-only -fno-diagnostics-show-line-numbers -fcaret-diagnostics-max-lines=5 %s 2>&1 | FileCheck %s -strict-whitespace
3 struct foo {
4 int a;
5 };
7 //CHECK: {{.*}}: error: unsupported type for named register variable
8 //CHECK-NEXT: {{^}}register struct foo bar asm("esp");
9 //CHECK-NEXT: {{^}} ^~~~~~~~~~{{$}}
10 register struct foo bar asm("esp");
12 //CHECK: {{.*}}: error: register 'edi' unsuitable for global register variables on this target
13 //CHECK-NEXT: {{^}}register int r0 asm ("edi");
14 //CHECK-NEXT: {{^}} ^{{$}}
15 register int r0 asm ("edi");
17 //CHECK: {{.*}}: error: size of register 'esp' does not match variable size
18 //CHECK-NEXT: {{^}}register long long r1 asm ("esp");
19 //CHECK-NEXT: {{^}} ^{{$}}
20 register long long r1 asm ("esp");