mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
java: add auto-generated overlay annotations
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Provides classes and predicates for detecting conflicting accesses in the sense of the Java Memory Model.
|
* Provides classes and predicates for detecting conflicting accesses in the sense of the Java Memory Model.
|
||||||
*/
|
*/
|
||||||
|
overlay[local?]
|
||||||
|
module;
|
||||||
|
|
||||||
import java
|
import java
|
||||||
import Concurrency
|
import Concurrency
|
||||||
@@ -9,6 +11,7 @@ import Concurrency
|
|||||||
* Holds if `t` is the type of a lock.
|
* Holds if `t` is the type of a lock.
|
||||||
* Currently a crude test of the type name.
|
* Currently a crude test of the type name.
|
||||||
*/
|
*/
|
||||||
|
overlay[caller?]
|
||||||
pragma[inline]
|
pragma[inline]
|
||||||
predicate isLockType(Type t) { t.getName().matches("%Lock%") }
|
predicate isLockType(Type t) { t.getName().matches("%Lock%") }
|
||||||
|
|
||||||
@@ -208,6 +211,7 @@ class ExposedFieldAccess extends FieldAccess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Holds if the location of `a` is strictly before the location of `b`. */
|
/** Holds if the location of `a` is strictly before the location of `b`. */
|
||||||
|
overlay[caller?]
|
||||||
pragma[inline]
|
pragma[inline]
|
||||||
predicate orderedLocations(Location a, Location b) {
|
predicate orderedLocations(Location a, Location b) {
|
||||||
a.getStartLine() < b.getStartLine()
|
a.getStartLine() < b.getStartLine()
|
||||||
|
|||||||
Reference in New Issue
Block a user