summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unused-local-typedef-x86asm.cpp
blob: d7792c0e11eb808ec1b0be1d087a46f798b9295b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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
}