Handle typeof() expressions
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 20 Feb 2018 10:15:08 +0000 (10:15 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 20 Feb 2018 10:15:08 +0000 (10:15 +0000)
commit65d2d5bad4ee0db2c824ebd7faec75df401c4056
treed8ec9a12a8b75fbbfa832bfb8c1ffdd722e9b381
parent8234b4893ab6ca9e4f0f21d5ec73ae9d8cf5dc3d
Handle typeof() expressions

Before this patch, LLDB was not able to evaluate expressions that
resulted in a value with a typeof- or decltype-type. This patch fixes
that.

Before:
  (lldb) p int i; __typeof__(i) j = 1; j
  (typeof (i)) $0 =

After:
  (lldb) p int i; __typeof__(i) j = 1; j
  (typeof (i)) $0 = 1

Differential revision: https://reviews.llvm.org/D43471

rdar://37461520

llvm-svn: 325568
lldb/lit/Expr/TestTypeOfDeclTypeExpr.test [new file with mode: 0644]
lldb/source/Symbol/ClangASTContext.cpp