hotpaw2
hotpaw2

Reputation: 70733

XCode 4 Analyze configuration?

Is there a way to configure which types of problems the XCode 4 static Analyzer tool reports and doesn't report?

I'm am dealing with some legacy code that "works" but has tons of static analysis issues, and am trying to list certain potentially more critical issues first.

Upvotes: 0

Views: 1729

Answers (2)

hotpaw2
hotpaw2

Reputation: 70733

In Xcode 4, under project or target Build Settings, near the bottom, are the settings for the Apple LLVM compiler x.0 - Warnings and Static Analyzer - Checkers. In those build settings, one can turn off or on various warnings that the Product Analyze menu generates, such as report Dead Stores, etc.

Upvotes: 1

Craig Otis
Craig Otis

Reputation: 32104

I don't have a lot of experience customizing Clang (the static analyzer Xcode uses) myself, but this blog post seems to point to two different change you can make:

  1. Turning off some individual warning types in the Build Settings
  2. Using pragma to ignore specific warnings once you're aware of the right argument

While these options don't really provide any method of "prioritizing" the warnings, you can at least temporarily ignore the ones that you know to be less critical.

Upvotes: 1

Related Questions