]> granicus.if.org Git - clang/commit
PR26449: Fixes for bugs in __builtin_classify_type implementation
authorAndrey Bokhanko <andreybokhanko@gmail.com>
Mon, 15 Feb 2016 10:39:04 +0000 (10:39 +0000)
committerAndrey Bokhanko <andreybokhanko@gmail.com>
Mon, 15 Feb 2016 10:39:04 +0000 (10:39 +0000)
commite8185c6d76fc013c59d92ccc7cdf7553eb01cb1c
tree42ff5dc9ac411ac42d7269336cf128ad79f6d99e
parent60ea58923cedab42181297ba150cab731449fc67
PR26449: Fixes for bugs in __builtin_classify_type implementation

This patch fixes the following bugs in __builtin_classify_type implementation:
1) Support for member functions and fields
2) Same behavior as GCC in C mode (specifically, return integer_type_class for
   enums and pointer_type_class for function pointers and arrays). Behavior in
   C++ mode didn't changed.

Also, it refactors the whole implementation, by replacing a sequence of
if-else-if with a couple of switches.

Differential Revision: http://reviews.llvm.org/D16846

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260881 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp