summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-01 22:47:07 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-01 22:47:07 +0000
commit697a39110fab8dafb7374b021bfd16c88f6d58ef (patch)
tree59dec6b65fce23d4f8cd474ae231d954ce28eb9f
parent6789e210943af5fc0473844f7a78ac21988e54f2 (diff)
downloadbcm5719-llvm-697a39110fab8dafb7374b021bfd16c88f6d58ef.tar.gz
bcm5719-llvm-697a39110fab8dafb7374b021bfd16c88f6d58ef.zip
Minor cleanup with the ternary operator
llvm-svn: 100144
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 8024af28d45..501c877c3dd 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -2152,7 +2152,7 @@ QualType Sema::CXXCheckConditionalOperands(Expr *&Cond, Expr *&LHS, Expr *&RHS,
// C++0x 5.16p4
// If the second and third operands are lvalues and have the same type,
// the result is of that type [...]
- bool Same = Context.getCanonicalType(LTy) == Context.getCanonicalType(RTy);
+ bool Same = Context.hasSameType(LTy, RTy);
if (Same && LHS->isLvalue(Context) == Expr::LV_Valid &&
RHS->isLvalue(Context) == Expr::LV_Valid)
return LTy;
@@ -2213,7 +2213,7 @@ QualType Sema::CXXCheckConditionalOperands(Expr *&Cond, Expr *&LHS, Expr *&RHS,
return Composite;
}
- // Similarly, attempt to find composite type of twp objective-c pointers.
+ // Similarly, attempt to find composite type of two objective-c pointers.
Composite = FindCompositeObjCPointerType(LHS, RHS, QuestionLoc);
if (!Composite.isNull())
return Composite;
OpenPOWER on IntegriCloud