Catching Mistakes with Fix-it
In a target built with the LLVM compiler, open a source file.
Introduce an error in the code.
When a red underbar or a caret appears, click the symbol in the gutter to see the error message.
If Fix-it suggests corrections, select a correction and press Return.
Correct mistakes with Fix-it as you enter source code.
Fix-it scans your source text as you type. Fix-it marks syntax errors with a red underbar or a caret at the position of the error, and a symbol in the gutter. Clicking the symbol displays a message describing the possible syntax error and, in many cases, offers to repair it automatically. Select a suggested correction and press Return to accept it. Press Esc to cancel the operation.
To use Fix-it, you must build the target with the LLVM compiler and the indexing of your project must be complete. Fix-it works with the C, Objective-C, and Objective-C++ languages.
The video shows correcting a double equals sign in an assignment statement.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-01-09)