[LLVMbugs] [Bug 13178] New: Add fixit for smart quotes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 22 11:09:23 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13178
Bug #: 13178
Summary: Add fixit for smart quotes
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tewha at me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Please add a better warning when a smart quote is encountered in Objective-C
source. This can happen when copy-pasting code from blogs.
Rationale:
Smart quotes and straight quotes are really similar on screen, and can be hard
to pick out. However, using smart quotes gives you a strange error message,
seemingly unrelated to the smart quote.
C Example:
char foo[] = "foo";
I get:
Expected expression.
Would like:
Found a smart quote string: “foo”.
Fix to "foo"?
Objective C Example:
NSDateFormatter *UTCFormatter = [[NSDateFormatter alloc] init];
UTCFormatter.timeZone = [NSTimeZone timeZoneWithName:@“UTC”];
I get:
Unexpected @ in program.
I'd like:
Found a smart quote string: @“UTC”.
Fix to @"UTC"?
I originally filed this in radar as 11725328, before realizing it probably
belonged here instead.
--
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.
More information about the llvm-bugs
mailing list