summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-17 18:54:22 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-17 18:54:22 +0000
commitb94e5a33b372eaa88361576722b605e4f8c5d07a (patch)
tree423b73c6847e1a3d9bd81189fe25c342824d303d
parentc89ac07e7adf63d0f34ec0ffc43867a2493a12bb (diff)
downloadbcm5719-llvm-b94e5a33b372eaa88361576722b605e4f8c5d07a.tar.gz
bcm5719-llvm-b94e5a33b372eaa88361576722b605e4f8c5d07a.zip
Don't emit warn_logical_and_in_logical_or for macros. Fixes rdar://8678458
llvm-svn: 119537
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 17563fe3e4f..7a73ad633f4 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -7393,7 +7393,7 @@ static void DiagnoseBinOpPrecedence(Sema &Self, BinaryOperatorKind Opc,
// Warn about arg1 || arg2 && arg3, as GCC 4.3+ does.
// We don't warn for 'assert(a || b && "bad")' since this is safe.
- if (Opc == BO_LOr) {
+ if (Opc == BO_LOr && !OpLoc.isMacroID()/* Don't warn in macros. */) {
DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, lhs);
DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, rhs);
}
OpenPOWER on IntegriCloud