forked from OSchip/llvm-project
Fix for PR3212: don't descend into C++ operator overloading code for C
programs. llvm-svn: 61056
This commit is contained in:
parent
bb2b3be9e1
commit
254a1a285c
|
@ -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()->isRecordType() ||
|
||||
LHSExp->getType()->isEnumeralType() ||
|
||||
RHSExp->getType()->isRecordType() ||
|
||||
RHSExp->getType()->isEnumeralType()) {
|
||||
RHSExp->getType()->isEnumeralType())) {
|
||||
// Add the appropriate overloaded operators (C++ [over.match.oper])
|
||||
// to the candidate set.
|
||||
OverloadCandidateSet CandidateSet;
|
||||
|
|
Loading…
Reference in New Issue