|
run iwyu on base!
(on os x)
In general, follow http://code.google.com/p/include-what-you-use/wiki/InstructionsForUsers
You need to build with `make REQUIRES_RTTI=1`
Build base like this:
cd base
xcodebuild -target base CC=/Users/thakis/src/llvm-svn/Release+Asserts/bin/include-what-you-use 2>&1 | tee iwyuout.txt
python ../../../llvm-svn/tools/clang/tools/include-what-you-use/fix_includes.py --blank_lines --nocomments < iwyuout.txt
iwyu gets confused because the cwd isn't the source root. I hacked around this with this iwyu patch:
hummer:include-what-you-use thakis$ svn diff
Index: iwyu_include_picker.cc
===================================================================
--- iwyu_include_picker.cc (revision 15)
+++ iwyu_include_picker.cc (working copy)
@@ -963,7 +963,7 @@
*path = NormalizeFilePath(*path);
// Case 1: a local (non-system) include.
-if (!StartsWith(*path, "/")) { // A relative path
+ if (!StartsWith(*path, "/")) { // A relative path
*include_map = StartsWith(*path, "third_party/") ?
&third_party_include_map_ : &google_include_map_;
} else if (StripPast(path, "/c++/") && StripPast(path, "/")) {
Index: iwyu_location_util.h
===================================================================
--- iwyu_location_util.h (revision 15)
+++ iwyu_location_util.h (working copy)
@@ -78,8 +78,11 @@
}
inline string GetFilePath(const clang::FileEntry* file) {
- return (IsBuiltinFile(file) ? "<built-in>" :
+ string result = (IsBuiltinFile(file) ? "<built-in>" :
NormalizeFilePath(file->getName()));
+ if (result.size () > 3 && result[0] == '.' && result[1] == '.' && result[2] == '/')
+ result = result.substr(3);
+ return result;
}
//------------------------------------------------------------
Stuff like #include </Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Security.framework/Headers/cssmtype.h> shows that the iwyu header maps need some updating on OS X (I don't fully grok the iwyu code yet)
With this patch, base has 8 build errors: http://codepad.org/HWHJ8fou
106 files changed, 669 insertions(+), 334 deletions(-)
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+671 lines, -336 lines) |
Patch |
 |
M |
base/at_exit.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/base64.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
base/base_paths.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/base_switches.cc
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/command_line.cc
|
View
|
|
1 chunk |
+10 lines, -11 lines |
0 comments
|
Download
|
 |
M |
base/crypto/cssm_init.cc
|
View
|
|
1 chunk |
+11 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/crypto/encryptor_mac.cc
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/crypto/rsa_private_key.cc
|
View
|
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/crypto/rsa_private_key_mac.cc
|
View
|
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/crypto/secure_hash_default.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/crypto/signature_creator_mac.cc
|
View
|
|
1 chunk |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/crypto/signature_verifier_mac.cc
|
View
|
|
1 chunk |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/crypto/symmetric_key_mac.cc
|
View
|
|
1 chunk |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/debug/debugger.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/debug/debugger_posix.cc
|
View
|
|
1 chunk |
+5 lines, -27 lines |
0 comments
|
Download
|
 |
M |
base/debug/profiler.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/debug/stack_trace.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/debug/stack_trace_posix.cc
|
View
|
|
2 chunks |
+9 lines, -13 lines |
0 comments
|
Download
|
 |
M |
base/debug/trace_event.cc
|
View
|
|
1 chunk |
+14 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/environment.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/file_descriptor_shuffle.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/file_path.cc
|
View
|
|
1 chunk |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/file_util.cc
|
View
|
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/file_util_posix.cc
|
View
|
|
2 chunks |
+12 lines, -16 lines |
0 comments
|
Download
|
 |
M |
base/file_util_proxy.cc
|
View
|
|
1 chunk |
+15 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/global_descriptors_posix.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/hmac_mac.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/json/json_reader.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/json/json_writer.cc
|
View
|
|
1 chunk |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/json/string_escape.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/lazy_instance.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/logging.cc
|
View
|
|
3 chunks |
+16 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/mac/os_crash_dumps.cc
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
base/md5.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/memory_debug.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/message_loop.cc
|
View
|
|
1 chunk |
+15 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/message_loop_proxy_impl.cc
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/message_pump_default.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/message_pump_libevent.cc
|
View
|
|
1 chunk |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/metrics/field_trial.cc
|
View
|
|
1 chunk |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/metrics/histogram.cc
|
View
|
|
1 chunk |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/metrics/stats_counters.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/metrics/stats_table.cc
|
View
|
|
1 chunk |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/native_library_mac.mm
|
View
|
|
1 chunk |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/nss_util.cc
|
View
|
|
1 chunk |
+19 lines, -10 lines |
0 comments
|
Download
|
 |
M |
base/path_service.cc
|
View
|
|
1 chunk |
+15 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/pickle.cc
|
View
|
|
1 chunk |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/platform_file_posix.cc
|
View
|
|
1 chunk |
+11 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/process_posix.cc
|
View
|
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/process_util.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/process_util_posix.cc
|
View
|
|
1 chunk |
+22 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/rand_util.cc
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/rand_util_posix.cc
|
View
|
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/ref_counted.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/ref_counted_memory.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/safe_strerror_posix.cc
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/scoped_native_library.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/scoped_temp_dir.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/sha1_portable.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/sha2.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/shared_memory_posix.cc
|
View
|
|
1 chunk |
+12 lines, -6 lines |
0 comments
|
Download
|
 |
M |
base/string16.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/string_number_conversions.cc
|
View
|
|
1 chunk |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
base/string_piece.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/string_split.cc
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/string_util.cc
|
View
|
|
1 chunk |
+9 lines, -16 lines |
0 comments
|
Download
|
 |
M |
base/stringprintf.cc
|
View
|
|
1 chunk |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/sync_socket_posix.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/synchronization/cancellation_flag.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/synchronization/condition_variable_posix.cc
|
View
|
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/synchronization/lock.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/synchronization/lock_impl_posix.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/synchronization/waitable_event_posix.cc
|
View
|
|
1 chunk |
+11 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/synchronization/waitable_event_watcher_posix.cc
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/sys_info_mac.cc
|
View
|
|
1 chunk |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/sys_info_posix.cc
|
View
|
|
1 chunk |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
base/task_queue.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/third_party/dmg_fp/dtoa_wrapper.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/third_party/dmg_fp/g_fmt.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
base/third_party/icu/icu_utf.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
base/third_party/nspr/prtime.cc
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/third_party/nss/sha512.cc
|
View
|
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/threading/non_thread_safe.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
base/threading/platform_thread_posix.cc
|
View
|
|
1 chunk |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/threading/simple_thread.cc
|
View
|
|
1 chunk |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread.cc
|
View
|
|
1 chunk |
+13 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread_checker.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread_collision_warner.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread_local_posix.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread_local_storage_posix.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/threading/thread_restrictions.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/threading/watchdog.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/threading/worker_pool_posix.cc
|
View
|
|
1 chunk |
+12 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/time.cc
|
View
|
|
1 chunk |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/time_mac.cc
|
View
|
|
1 chunk |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/time_posix.cc
|
View
|
|
1 chunk |
+3 lines, -6 lines |
0 comments
|
Download
|
 |
M |
base/timer.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/tracked.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/tracked_objects.cc
|
View
|
|
1 chunk |
+17 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/utf_offset_string_conversions.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/utf_string_conversion_utils.cc
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/utf_string_conversions.cc
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/values.cc
|
View
|
|
1 chunk |
+10 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/version.cc
|
View
|
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
base/vlog.cc
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
base/weak_ptr.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|