CPP: Speed it up.

This commit is contained in:
Geoffrey White
2018-10-29 16:52:44 +00:00
parent 55465c3eae
commit fc6b791f58

View File

@@ -91,13 +91,15 @@ predicate emptyBlockContainsNonchild(Block b) {
*/
predicate lineComment(Block b) {
emptyBlock(_, b) and
exists(File f, int line |
f = b.getFile() and
line = b.getLocation().getStartLine() and
line = b.getLocation().getEndLine() and
exists(Comment c |
c.getFile() = f and
c.getLocation().getStartLine() = line
exists(Location bLocation, File f, int line |
bLocation = b.getLocation() and
f = bLocation.getFile() and
line = bLocation.getStartLine() and
line = bLocation.getEndLine() and
exists(Comment c, Location cLocation |
cLocation = c.getLocation() and
cLocation.getFile() = f and
cLocation.getStartLine() = line
)
)
}