Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55465c3 commit fc6b791Copy full SHA for fc6b791
1 file changed
cpp/ql/src/Best Practices/Likely Errors/EmptyBlock.ql
@@ -91,13 +91,15 @@ predicate emptyBlockContainsNonchild(Block b) {
91
*/
92
predicate lineComment(Block b) {
93
emptyBlock(_, b) and
94
- exists(File f, int line |
95
- f = b.getFile() and
96
- line = b.getLocation().getStartLine() and
97
- line = b.getLocation().getEndLine() and
98
- exists(Comment c |
99
- c.getFile() = f and
100
- 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
101
+ cLocation.getFile() = f and
102
+ cLocation.getStartLine() = line
103
)
104
105
}
0 commit comments