diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-17 18:54:22 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-17 18:54:22 +0000 |
commit | d92ccaa76923cfa374d5d9a33e82f15412fa3daf (patch) | |
tree | 367824958ce7fa3b2b1c0b49c1e0a0a8b1e309fc | |
parent | 567bb71a01bcf178c6fcabb3eecf7a8c4f71e674 (diff) |
Don't emit warn_logical_and_in_logical_or for macros. Fixes rdar://8678458
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119537 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 17563fe3e4..7a73ad633f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/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); } |