Plumenator
Plumenator

Reputation: 1682

How to static analyze C++ and Objective-C++ code?

The "Build and analyze" option doesn't seem to work for .cpp and .mm files. I tried "clang --analyze" on individual files without any standard #includes and it works well. However I'm not able to run it on my Xcode project. I couldn't figure out a way to make clang find the standard #includes like even UIKit.h. Any clues?

Upvotes: 6

Views: 1809

Answers (2)

Plumenator
Plumenator

Reputation: 1682

One way is to create symlinks to the Frameworks present in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/Frameworks/XXX.framework/Headers and point clang to the symlinks using the -I option.

Upvotes: 1

mmmmmm
mmmmmm

Reputation: 32710

clang's C++ support is not complete yet clang web site

Apple's version is more explicit clang man page

Clang currently does not have C++ support

Upvotes: 1

Related Questions