http://llvm.org/bugs/show_bug.cgi?id=12285
Bug #: 12285
Summary: -Widiomatic-parentheses does not work in all cases
[objc]
Product: clang
Version: 3.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Consider the following piece of code in Objective-C:
NSUInteger uid = 10;
if (uid = 11) {
// ...
}
With -Widiomatic-parentheses it gives me the warning "Using the result of an
assignment as a condition without parentheses" (as expected).
However, in the following case no warning is emitted:
if (self.uid = 100) {
// ...
}
The type of 'uid', numbers and variable names can be arbitrary. It's 'self'
that inhibits the warning in some unexpected way.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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