]> granicus.if.org Git - clang/commit
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm
authorMichael Zuckerman <Michael.zuckerman@intel.com>
Tue, 15 Dec 2015 14:04:18 +0000 (14:04 +0000)
committerMichael Zuckerman <Michael.zuckerman@intel.com>
Tue, 15 Dec 2015 14:04:18 +0000 (14:04 +0000)
commit980893d5370d3a1ab0fbf928786335b5aef95561
treea2def67f52fe14886610b33d23c4b119269e5e76
parent81266b88cba8842b945978ddb7c80d02a7ee9d44
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm

Clang doesn’t support a use of “this” pointer inside inline asm.
When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer.
Clang returns with an error.
This patch fixes that.

error: expected unqualified-id
For example:
'''
struct A {
    void f() {
          __asm mov eax, this
              // error: expected unqualified-id
                  }
};
'''
Differential Revision: http://reviews.llvm.org/D15115

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255645 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmt.cpp
lib/Parse/ParseStmtAsm.cpp
test/CodeGen/ms_this.cpp [new file with mode: 0644]