That way, most of the test can run everywhere. Also give the new file an x86
triple in addition to a REQUIRES line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217314
91177308-0d34-0410-b5e6-
96231b3b80d8
--- /dev/null
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -std=c++11 -Wunused-local-typedef -verify -fasm-blocks %s
+// expected-no-diagnostics
+void use_in_asm() {
+ typedef struct {
+ int a;
+ int b;
+ } A;
+ __asm mov eax, [eax].A.b
+
+ using Alias = struct {
+ int a;
+ int b;
+ };
+ __asm mov eax, [eax].Alias.b
+}
-// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -fsyntax-only -Wunused-local-typedef -verify -std=c++1y -fasm-blocks %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused-local-typedef -verify -std=c++1y %s
struct S {
typedef int Foo; // no diag
A2::Foo adsf2;
}
-void use_in_asm() {
- typedef struct {
- int a;
- int b;
- } A;
- __asm mov eax, [eax].A.b
-
- using Alias = struct {
- int a;
- int b;
- };
- __asm mov eax, [eax].Alias.b
-}
-
auto sneaky() {
struct S {
// Local typedefs can be used after the scope they were in has closed: