[cfe-commits] r61056 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Dec 15 14:34:21 PST 2008
Author: efriedma
Date: Mon Dec 15 16:34:21 2008
New Revision: 61056
URL: http://llvm.org/viewvc/llvm-project?rev=61056&view=rev
Log:
Fix for PR3212: don't descend into C++ operator overloading code for C
programs.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=61056&r1=61055&r2=61056&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Dec 15 16:34:21 2008
@@ -963,10 +963,10 @@
Expr *LHSExp = static_cast<Expr*>(Base), *RHSExp = static_cast<Expr*>(Idx);
if (getLangOptions().CPlusPlus &&
- LHSExp->getType()->isRecordType() ||
- LHSExp->getType()->isEnumeralType() ||
- RHSExp->getType()->isRecordType() ||
- RHSExp->getType()->isEnumeralType()) {
+ (LHSExp->getType()->isRecordType() ||
+ LHSExp->getType()->isEnumeralType() ||
+ RHSExp->getType()->isRecordType() ||
+ RHSExp->getType()->isEnumeralType())) {
// Add the appropriate overloaded operators (C++ [over.match.oper])
// to the candidate set.
OverloadCandidateSet CandidateSet;
More information about the cfe-commits
mailing list