summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2010-12-07 08:25:34 +0000
committerJay Foad <jay.foad@gmail.com>2010-12-07 08:25:34 +0000
commit6d4db0c8850543661493af107a1d601d12a89509 (patch)
tree8d09f8cde8e18587dc50e42150992071c57f9e43 /clang/lib/Sema/SemaTemplateDeduction.cpp
parent583abbc4df3d9b9e5a86a56ae581970b98dc5249 (diff)
downloadbcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.tar.gz
bcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.zip
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121121
Diffstat (limited to 'clang/lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index 070c334f872..c14acd62fe7 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -57,9 +57,9 @@ using namespace clang;
/// necessary to compare their values regardless of underlying type.
static bool hasSameExtendedValue(llvm::APSInt X, llvm::APSInt Y) {
if (Y.getBitWidth() > X.getBitWidth())
- X.extend(Y.getBitWidth());
+ X = X.extend(Y.getBitWidth());
else if (Y.getBitWidth() < X.getBitWidth())
- Y.extend(X.getBitWidth());
+ Y = Y.extend(X.getBitWidth());
// If there is a signedness mismatch, correct it.
if (X.isSigned() != Y.isSigned()) {
OpenPOWER on IntegriCloud