Catching Mistakes with Fix-it

Correct mistakes with Fix-it as you enter source code.

To correct a mistake with Fix-it
  1. In a target built with the LLVM compiler, open a source file.

  2. Introduce an error in the code.

  3. When a red underbar or a caret appears, click the symbol in the gutter to see the error message.

  4. If Fix-it suggests corrections, select a correction and press Return.


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.