Index: tools/clang/plugins/tests/ipc.txt |
diff --git a/tools/clang/plugins/tests/ipc.txt b/tools/clang/plugins/tests/ipc.txt |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fbca40b865e413781c484aeffad31168b9fc39c9 |
--- /dev/null |
+++ b/tools/clang/plugins/tests/ipc.txt |
@@ -0,0 +1,224 @@ |
+ipc.cpp:83:26: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'. |
+ WriteParam(pickle, p.size); // ERROR |
+ ^ |
+ipc.cpp:107:24: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ WriteParam(pickle, static_cast<long>(container.value)); // ERROR |
+ ^ |
+ipc.cpp:135:29: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'. |
+ IPC::WriteParam(pickle, size_t(0)); // ERROR |
+ ^ |
+ipc.cpp:145:29: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'time_t'. |
+ IPC::WriteParam(pickle, time_t(0)); // ERROR |
+ ^ |
+ipc.cpp:156:27: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ IPC::WriteParam(pickle, long(0)); // ERROR |
+ ^ |
+ipc.cpp:162:29: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'clock_t'. |
+ IPC::WriteParam(pickle, clock_t(0)); // ERROR |
+ ^ |
+ipc.cpp:194:1: error: [chromium-ipc] IPC tuple references banned type 'size_t'. |
+IPC_TEST_MESSAGE(__COUNTER__, (bool, size_t, Empty, long)) // 2 ERRORs |
+^ |
+ipc.cpp:190:3: note: expanded from macro 'IPC_TEST_MESSAGE' |
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in) |
+ ^ |
+ipc.cpp:186:5: note: expanded from macro 'IPC_MESSAGE_DECL' |
+ using InTuple = in_tuple; \ |
+ ^ |
+ipc.cpp:194:1: error: [chromium-ipc] IPC tuple references banned type 'long'. |
+ipc.cpp:190:3: note: expanded from macro 'IPC_TEST_MESSAGE' |
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in) |
+ ^ |
+ipc.cpp:186:5: note: expanded from macro 'IPC_MESSAGE_DECL' |
+ using InTuple = in_tuple; \ |
+ ^ |
+ipc.cpp:198:1: error: [chromium-ipc] IPC tuple references banned type 'long' via 'long2D'. |
+IPC_TEST_MESSAGE(__COUNTER__, (bool, long2D)) // ERROR |
+^ |
+ipc.cpp:190:3: note: expanded from macro 'IPC_TEST_MESSAGE' |
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in) |
+ ^ |
+ipc.cpp:186:5: note: expanded from macro 'IPC_MESSAGE_DECL' |
+ using InTuple = in_tuple; \ |
+ ^ |
+ipc.cpp:197:29: note: see here |
+typedef std::vector<long1D> long2D; |
+ ^ |
+ipc.cpp:196:27: note: see here |
+typedef std::vector<long> long1D; |
+ ^ |
+ipc.cpp:200:1: error: [chromium-ipc] IPC tuple references banned type 'size_t' via 'std::pair<size_t, _Bool>'. |
+IPC_TEST_MESSAGE(__COUNTER__, (char, short, std::pair<size_t, bool>)) // ERROR |
+^ |
+ipc.cpp:190:3: note: expanded from macro 'IPC_TEST_MESSAGE' |
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in) |
+ ^ |
+ipc.cpp:186:5: note: expanded from macro 'IPC_MESSAGE_DECL' |
+ using InTuple = in_tuple; \ |
+ ^ |
+ipc.cpp:202:1: error: [chromium-ipc] IPC tuple references banned type 'long' via 'std::vector<std::vector<long &> &>'. |
+IPC_TEST_MESSAGE(__COUNTER__, (std::vector<std::vector<long&>&>&)) // ERROR |
+^ |
+ipc.cpp:190:3: note: expanded from macro 'IPC_TEST_MESSAGE' |
+ IPC_MESSAGE_DECL(TestMessage, id, IPC_TUPLE in) |
+ ^ |
+ipc.cpp:186:5: note: expanded from macro 'IPC_MESSAGE_DECL' |
+ using InTuple = in_tuple; \ |
+ ^ |
+ipc.cpp:216:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ CALL_WRITEPARAM(long) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:217:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'. |
+ CALL_WRITEPARAM(unsigned long) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:218:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'intmax_t'. |
+ CALL_WRITEPARAM(intmax_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:219:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'uintmax_t'. |
+ CALL_WRITEPARAM(uintmax_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:220:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'intptr_t'. |
+ CALL_WRITEPARAM(intptr_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:221:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'uintptr_t'. |
+ CALL_WRITEPARAM(uintptr_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:222:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'wint_t'. |
+ CALL_WRITEPARAM(wint_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:223:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'. |
+ CALL_WRITEPARAM(size_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:224:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'rsize_t'. |
+ CALL_WRITEPARAM(rsize_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:225:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'ssize_t'. |
+ CALL_WRITEPARAM(ssize_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:226:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'ptrdiff_t'. |
+ CALL_WRITEPARAM(ptrdiff_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:227:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'dev_t'. |
+ CALL_WRITEPARAM(dev_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:228:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'off_t'. |
+ CALL_WRITEPARAM(off_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:229:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'clock_t'. |
+ CALL_WRITEPARAM(clock_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:230:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'time_t'. |
+ CALL_WRITEPARAM(time_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:231:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'suseconds_t'. |
+ CALL_WRITEPARAM(suseconds_t) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:235:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'my_size'. |
+ CALL_WRITEPARAM(my_size) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:234:18: note: see here |
+ typedef size_t my_size; |
+ ^ |
+ipc.cpp:240:32: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'. |
+ IPC::WriteParam(nullptr, p + 1); // ERROR |
+ ^ |
+ipc.cpp:249:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'my_size'. |
+ IPC::WriteParam(nullptr, p); // ERROR |
+ ^ |
+ipc.cpp:246:32: note: see here |
+ typedef const my_size_base my_size; |
+ ^ |
+ipc.cpp:245:20: note: see here |
+ typedef size_t my_size_base; |
+ ^ |
+ipc.cpp:253:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long' via 'std::vector<long>'. |
+ CALL_WRITEPARAM(std::vector<long>) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:254:3: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'std::vector<size_t>'. |
+ CALL_WRITEPARAM(std::vector<size_t>) // ERROR |
+ ^ |
+ipc.cpp:212:32: note: expanded from macro 'CALL_WRITEPARAM' |
+ IPC::WriteParam(nullptr, p); \ |
+ ^ |
+ipc.cpp:324:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ IPC::WriteParam(nullptr, p.get<long>()); // ERROR |
+ ^ |
+ipc.cpp:325:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ IPC::WriteParam(nullptr, p.get_long()); // ERROR |
+ ^ |
+ipc.cpp:326:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'long'. |
+ IPC::WriteParam(nullptr, p.long_data); // ERROR |
+ ^ |
+ipc.cpp:331:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'. |
+ IPC::WriteParam(nullptr, p.get_size()); // ERROR |
+ ^ |
+ipc.cpp:332:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t'. |
+ IPC::WriteParam(nullptr, p.size_data); // ERROR |
+ ^ |
+ipc.cpp:336:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long'. |
+ IPC::WriteParam(nullptr, p.get<uint64_t>()); // ERROR |
+ ^ |
+ipc.cpp:341:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'unsigned long' via 'struct std::vector<unsigned long, struct std::allocator<unsigned long> >'. |
+ IPC::WriteParam(nullptr, p.get<std::vector<uint64_t>>()); // ERROR |
+ ^ |
+ipc.cpp:348:28: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'std::vector<size_t>'. |
+ IPC::WriteParam(nullptr, p.get_sizes()); // ERROR |
+ ^ |
+ipc.cpp:349:30: error: [chromium-ipc] IPC::WriteParam() is called on blacklisted type 'size_t' via 'std::vector<size_t>'. |
+ IPC::WriteParam(nullptr, p.sizes_data); // ERROR |
+ ^ |
+41 errors generated. |