Fix for PR3212: don't descend into C++ operator overloading code for C

programs.

llvm-svn: 61056
This commit is contained in:
Eli Friedman 2008-12-15 22:34:21 +00:00
parent bb2b3be9e1
commit 254a1a285c
1 changed files with 4 additions and 4 deletions

View File

@ -963,10 +963,10 @@ ActOnArraySubscriptExpr(Scope *S, ExprTy *Base, SourceLocation LLoc,
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;