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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs