]> granicus.if.org Git - clang/commit
Update assumption in template diffing about integer template arguments.
authorRichard Trieu <rtrieu@google.com>
Thu, 26 Feb 2015 02:40:48 +0000 (02:40 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 26 Feb 2015 02:40:48 +0000 (02:40 +0000)
commit8cb59500afa2dc80370243d907ef4995fb06ec15
tree401b9b2d66dc5b29db7511fc795fb349190eff4f
parent336bed4e8aaca354a058cfcdd6b6c0bb51ed5806
Update assumption in template diffing about integer template arguments.

Fix for PR22017.  Integer template arguments are automatically bit extended to
the size of the integer type.  In template diffing, evaluated expressions were
not having their results extending, leading to comparing two APSInt's with
different widths.  Apply the proper bit extending when evaluating template
arguments.  This mainly affected bool template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230603 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTDiagnostic.cpp
test/Misc/diag-template-diffing.cpp