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

Reply via email to