]> granicus.if.org Git - clang/commit
Fix a bunch of integer template argument problems in template type diffing.
authorRichard Trieu <rtrieu@google.com>
Sat, 20 Dec 2014 03:03:32 +0000 (03:03 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 20 Dec 2014 03:03:32 +0000 (03:03 +0000)
commit8db7a4073fb0d2863144a73f09c113ff40018637
treeafaff3d116a50195017233c54879d0fc1de5436a
parentdb865a1e4453bcdab9151476cf33c52b7b9eceb6
Fix a bunch of integer template argument problems in template type diffing.

Reverts most of the changes from r168005.  Since template arguments have proper
conversions now, no extending of integers is needed.  Further, since the
integers are the correct size now, use APSInt::operator== instead of
APSInt::hasSameValue since operator== will check the size and signness match.

Prior to one comparison of APSInt's, check that both are valid.  Previous, one
could be uninitialized.  Also changed APInt to APSInt in GetInt.  This
occassionally produced a sign flip, which will now be caught by operator==.

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