[LLVMbugs] [Bug 16673] New: -Wlogical-not-parentheses doesn't suggest closing paren correctly in DCHECK() macro
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 22 10:04:14 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16673
Bug ID: 16673
Summary: -Wlogical-not-parentheses doesn't suggest closing
paren correctly in DCHECK() macro
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
../../chrome/browser/sync/glue/data_type_manager_impl.cc:447:10: error: logical
not is only applied to the left hand side of this comparison
[-Werror,-Wlogical-not-parentheses]
DCHECK(!result.status == OK ||
^ ~~
../../base/logging.h:735:55: note: expanded from macro 'DCHECK'
LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
^
../../base/logging.h:386:5: note: expanded from macro 'LAZY_STREAM'
!(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
^
../../chrome/browser/sync/glue/data_type_manager_impl.cc:447:10: note: add
parentheses after the '!' to evaluate the comparison first
DCHECK(!result.status == OK ||
^
(
../../base/logging.h:735:55: note: expanded from macro 'DCHECK'
LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
^
../../base/logging.h:386:5: note: expanded from macro 'LAZY_STREAM'
!(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
^
../../chrome/browser/sync/glue/data_type_manager_impl.cc:447:10: note: add
parentheses around left hand side expression to silence this warning
DCHECK(!result.status == OK ||
^
(
../../base/logging.h:735:55: note: expanded from macro 'DCHECK'
LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
^
../../base/logging.h:386:5: note: expanded from macro 'LAZY_STREAM'
!(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
^
1 error generated.
Note that the missing ')' in the fixit.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130722/69c850df/attachment.html>
More information about the llvm-bugs
mailing list