summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-12-15 22:34:21 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-12-15 22:34:21 +0000
commit254a1a285c66002bf134020894136e58a96d2181 (patch)
tree713188fe3b9edadfa63a1495f684fc4c147a644e /clang/lib/Sema/SemaExpr.cpp
parentbb2b3be9e1b3ae66b2f48e9bc78aa22621525361 (diff)
downloadbcm5719-llvm-254a1a285c66002bf134020894136e58a96d2181.tar.gz
bcm5719-llvm-254a1a285c66002bf134020894136e58a96d2181.zip
Fix for PR3212: don't descend into C++ operator overloading code for C
programs. llvm-svn: 61056
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 98afb0f701d..affe2ae2403 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -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;
OpenPOWER on IntegriCloud