Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: tools/gcmole/gcmole.lua

Issue 240933002: Extend GCMole to also cover cctest files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix unsafe call-sites found by GCMole. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gcmole/gcmole.lua
diff --git a/tools/gcmole/gcmole.lua b/tools/gcmole/gcmole.lua
index cd91a913d31b243e8484f5d89e204a002c90bb9e..f1980a459611717744061c6d94b4f1592c4a7306 100644
--- a/tools/gcmole/gcmole.lua
+++ b/tools/gcmole/gcmole.lua
@@ -116,7 +116,7 @@ function InvokeClangPluginForEachFile(filenames, cfg, func)
cfg.arch_define)
for _, filename in ipairs(filenames) do
log("-- %s", filename)
- local action = cmd_line .. " src/" .. filename .. " 2>&1"
+ local action = cmd_line .. " " .. filename .. " 2>&1"
if FLAGS.verbose then print('popen ', action) end
local pipe = io.popen(action)
func(filename, pipe:lines())
@@ -129,19 +129,26 @@ end
-- GYP file parsing
local function ParseGYPFile()
- local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
- local gyp = f:read('*a')
- f:close()
+ local gyp = ""
+ local gyp_files = { "tools/gyp/v8.gyp", "test/cctest/cctest.gyp" }
+ for i = 1, #gyp_files do
+ local f = assert(io.open(gyp_files[i]), "failed to open GYP file")
+ local t = f:read('*a')
+ gyp = gyp .. t
+ f:close()
+ end
local result = {}
for condition, sources in
gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
- local files = {}
+ if result[condition] == nil then result[condition] = {} end
for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
- table.insert(files, file)
+ table.insert(result[condition], "src/" .. file)
+ end
+ for file in sources:gmatch "'(test-[^']-%.cc)'" do
+ table.insert(result[condition], "test/cctest/" .. file)
end
- result[condition] = files
end
return result
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698