]> granicus.if.org Git - clang/commit
Switch the type-trait like APIs on the AST to only check for incomplete
authorChandler Carruth <chandlerc@gmail.com>
Sat, 30 Apr 2011 10:31:50 +0000 (10:31 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 30 Apr 2011 10:31:50 +0000 (10:31 +0000)
commit018a088b3b30e500efa9173f7cd4b1b1f6a065a8
treef0690a852e067c1b15cf1597da0dbfd6fd2fb88a
parenteb65a108bd1eb613ed2a9ebfdbd73a9c872f0309
Switch the type-trait like APIs on the AST to only check for incomplete
types after looking through arrays. Arrays with an unknown bound seem to
be specifically allowed in the library type traits in C++0x, and GCC's
builtin __is_trivial returns 'true' for the type 'int[]'. Now Clang
agrees with GCC about __is_trivial here.

Also hardens these methods against dependent types by just returning false.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130605 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Type.cpp
test/SemaCXX/type-traits.cpp