From 0e0ab1ea972ddb555a9b31ce8264eab117fbf56e Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Wed, 26 Sep 2018 09:15:20 +0200 Subject: [PATCH 01/10] C++: make `unresolve` a member of ElementBase Also remove the charpred of ElementBase. This gets rid of many redundant charpred checks. It means that incomplete classes from the db are now `Element`s, which is maybe noisy but should not be harmful. Together, these changes give a great reduction in DIL and should help the optimiser. It brings the DIL of `UncontrolledFormatString.ql` down from 43,908 lines to 35,400 lines. --- cpp/ql/src/semmle/code/cpp/Class.qll | 7 ++- cpp/ql/src/semmle/code/cpp/Element.qll | 54 +++++++++++-------- cpp/ql/src/semmle/code/cpp/Specifier.qll | 4 +- .../src/semmle/code/cpp/pointsto/PointsTo.qll | 16 +++++- 4 files changed, 56 insertions(+), 25 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/Class.qll b/cpp/ql/src/semmle/code/cpp/Class.qll index 8d4414f03f38..7ebaf8c7df0f 100644 --- a/cpp/ql/src/semmle/code/cpp/Class.qll +++ b/cpp/ql/src/semmle/code/cpp/Class.qll @@ -12,7 +12,12 @@ private import semmle.code.cpp.internal.ResolveClass */ class Class extends UserType { Class() { - isClass(underlyingElement(this)) + isClass(this.underlying()) and + this = resolveClass(_) + } + + override @element unresolve() { + resolveClass(result) = this } /** Gets a child declaration of this class. */ diff --git a/cpp/ql/src/semmle/code/cpp/Element.qll b/cpp/ql/src/semmle/code/cpp/Element.qll index 7231d11aec9d..13f554960093 100644 --- a/cpp/ql/src/semmle/code/cpp/Element.qll +++ b/cpp/ql/src/semmle/code/cpp/Element.qll @@ -2,63 +2,75 @@ import semmle.code.cpp.Location private import semmle.code.cpp.Enclosing private import semmle.code.cpp.internal.ResolveClass -/** - * Get the `@element` that represents this `@element`. - * Normally this will simply be `e`, but sometimes it is not. - * For example, for an incomplete struct `e` the result may be a - * complete struct with the same name. - */ -private cached @element resolveElement(@element e) { - if isClass(e) - then result = resolveClass(e) - else result = e -} - /** * Get the `Element` that represents this `@element`. * Normally this will simply be a cast of `e`, but sometimes it is not. * For example, for an incomplete struct `e` the result may be a * complete struct with the same name. */ +pragma[inline] Element mkElement(@element e) { - result = resolveElement(e) + result.unresolve() = e } /** - * Get an `@element` that resolves to the `Element`. This should + * INTERNAL: Do not use. + * + * Gets an `@element` that resolves to the `Element`. This should * normally only be called from member predicates, where `e` is not * `this` and you need the result for an argument to a database * extensional. * See `underlyingElement` for when `e` is `this`. */ +pragma[inline] @element unresolveElement(Element e) { - resolveElement(result) = e + result = e.unresolve() } /** - * Get the `@element` that this `Element` extends. This should normally + * INTERNAL: Do not use. + * + * Gets the `@element` that this `Element` extends. This should normally * only be called from member predicates, where `e` is `this` and you * need the result for an argument to a database extensional. * See `unresolveElement` for when `e` is not `this`. */ +pragma[inline] @element underlyingElement(Element e) { result = e } /** - * A C/C++ element with no member predicates other than `toString`. Not for + * A C/C++ element with a minimal set of member predicates. Not for * general use. This class does not define a location, so classes wanting to * change their location without affecting other classes can extend * `ElementBase` instead of `Element` to create a new rootdef for `getURL`, * `getLocation`, or `hasLocationInfo`. */ class ElementBase extends @element { - ElementBase() { - this = resolveElement(_) - } - /** Gets a textual representation of this element. */ string toString() { none() } + + /** + * INTERNAL: Do not use. + * + * Gets the `@element` that this `Element` extends. This should normally only + * be called from member predicates on `this` where you need the result for + * an argument to a database extensional. + * See `unresolve` for when the qualifier is not `this`. + */ + final @element underlying() { result = this } + + /** + * INTERNAL: Do not use. + * + * Gets an `@element` that resolves to the `Element`. This should normally + * only be called from member predicates, where the qualifier is not `this` + * and you need the result for an argument to a database extensional. + * See `underlying` for when the qualifier is `this`. + */ + pragma[inline] + @element unresolve() { result = this } } /** diff --git a/cpp/ql/src/semmle/code/cpp/Specifier.qll b/cpp/ql/src/semmle/code/cpp/Specifier.qll index 373d8db57505..0bb9d0dd9b7d 100644 --- a/cpp/ql/src/semmle/code/cpp/Specifier.qll +++ b/cpp/ql/src/semmle/code/cpp/Specifier.qll @@ -294,13 +294,13 @@ class AttributeArgument extends Element, @attribute_arg { } override string toString() { - if exists (@attribute_arg_empty self | mkElement(self) = this) + if exists (@attribute_arg_empty self | self = underlyingElement(this)) then result = "empty argument" else exists (string prefix, string tail | (if exists(getName()) then prefix = getName() + "=" else prefix = "") and - (if exists (@attribute_arg_type self | mkElement(self) = this) + (if exists (@attribute_arg_type self | self = underlyingElement(this)) then tail = getValueType().getName() else tail = getValueText()) and result = prefix + tail) diff --git a/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll b/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll index bd4684cdfa42..7c70fd50d505 100644 --- a/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll +++ b/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll @@ -633,12 +633,26 @@ class PointsToExpr extends Expr pragma[noopt] Element pointsTo() { - this.interesting() and exists(int set, @element thisEntity, @element resultEntity | thisEntity = underlyingElement(this) and pointstosets(set, thisEntity) and setlocations(set, resultEntity) and resultEntity = unresolveElement(result)) + this.interesting() and + exists(int set, @element thisEntity, @element resultEntity | + thisEntity = this.underlying() and + pointstosets(set, thisEntity) and + setlocations(set, resultEntity) and + resultEntity = localUnresolveElement(result) + ) } float confidence() { result = 1.0 / count(this.pointsTo()) } } +/* + * This is used above in a `pragma[noopt]` context, which prevents its + * customary inlining. We materialise it explicitly here. + */ +private @element localUnresolveElement(Element e) { + result = unresolveElement(e) +} + /** * Holds if anything points to an element, that is, is equivalent to: * ``` From 6ccd208d4e0e74bb12759445f6a8525015e5d60b Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Wed, 26 Sep 2018 14:02:15 +0200 Subject: [PATCH 02/10] C++: Prevent incomplete classes from being Types Raw classes from the database that are incomplete and should be represented by their complete twin are now allowed to be `Element`s for performance reasons, but this commit prevents them from being `Type`s. It was causing confusion in test results and might also cause confusion in queries. --- cpp/ql/src/semmle/code/cpp/Class.qll | 3 +-- cpp/ql/src/semmle/code/cpp/Type.qll | 2 ++ cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/Class.qll b/cpp/ql/src/semmle/code/cpp/Class.qll index 7ebaf8c7df0f..e2364744b145 100644 --- a/cpp/ql/src/semmle/code/cpp/Class.qll +++ b/cpp/ql/src/semmle/code/cpp/Class.qll @@ -12,8 +12,7 @@ private import semmle.code.cpp.internal.ResolveClass */ class Class extends UserType { Class() { - isClass(this.underlying()) and - this = resolveClass(_) + isClass(this.underlying()) } override @element unresolve() { diff --git a/cpp/ql/src/semmle/code/cpp/Type.qll b/cpp/ql/src/semmle/code/cpp/Type.qll index d34f2e4916f0..3a78e6c7cf94 100644 --- a/cpp/ql/src/semmle/code/cpp/Type.qll +++ b/cpp/ql/src/semmle/code/cpp/Type.qll @@ -7,6 +7,8 @@ private import semmle.code.cpp.internal.ResolveClass * A C/C++ type. */ class Type extends Locatable, @type { + Type() { isType(this.underlying()) } + /** * Gets the name of this type. */ diff --git a/cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll b/cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll index eaefc8196cc8..5f9c0006435e 100644 --- a/cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll +++ b/cpp/ql/src/semmle/code/cpp/internal/ResolveClass.qll @@ -54,4 +54,10 @@ cached private module Cached { (usertypes(t,_,1) or usertypes(t,_,2) or usertypes(t,_,3) or usertypes(t,_,6) or usertypes(t,_,10) or usertypes(t,_,11) or usertypes(t,_,12)) } + + cached predicate isType(@type t) { + not isClass(t) + or + t = resolveClass(_) + } } From 3b2512fa0d12949d40a80c394195ac34cd20ad5b Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Wed, 26 Sep 2018 14:39:44 +0200 Subject: [PATCH 03/10] C++: pragma[nomagic] in Overflow.qll These two predicates were supposed to be fast but became slow after the recent inlining of `unresolve`. --- cpp/ql/src/semmle/code/cpp/security/Overflow.qll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll index 5e3a6cc8b80f..3a5b72c1d389 100644 --- a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll +++ b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll @@ -13,6 +13,7 @@ predicate guardedAbs(Operation e, Expr use) { } /** is the size of this use guarded to be less than something? */ +pragma[nomagic] predicate guardedLesser(Operation e, Expr use) { exists(IfStmt c, RelationalOperation guard | use = guard.getLesserOperand().getAChild*() and @@ -33,6 +34,7 @@ predicate guardedLesser(Operation e, Expr use) { } /** is the size of this use guarded to be greater than something? */ +pragma[nomagic] predicate guardedGreater(Operation e, Expr use) { exists(IfStmt c, RelationalOperation guard | use = guard.getGreaterOperand().getAChild*() and From 51697f077cb70dfd0f784c6d230b50356267cac0 Mon Sep 17 00:00:00 2001 From: Aditya Sharad Date: Wed, 26 Sep 2018 18:18:20 +0100 Subject: [PATCH 04/10] Version: Bump to 1.18.0 release. --- cpp/ql/src/META-INF/MANIFEST.MF | 4 ++-- csharp/ql/src/META-INF/MANIFEST.MF | 2 +- java/ql/src/META-INF/MANIFEST.MF | 4 ++-- javascript/ql/src/META-INF/MANIFEST.MF | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/ql/src/META-INF/MANIFEST.MF b/cpp/ql/src/META-INF/MANIFEST.MF index 9297719168ec..907b39deb610 100644 --- a/cpp/ql/src/META-INF/MANIFEST.MF +++ b/cpp/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle C/C++ Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.cpp.queries;singleton:=true -Bundle-Version: 1.18.0.qualifier +Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier,1.18.0.qualifier]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" diff --git a/csharp/ql/src/META-INF/MANIFEST.MF b/csharp/ql/src/META-INF/MANIFEST.MF index 9c1c8f2b1e1b..2dff4b6013ac 100644 --- a/csharp/ql/src/META-INF/MANIFEST.MF +++ b/csharp/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle C# Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.csharp.queries;singleton:=true -Bundle-Version: 1.18.0.qualifier +Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier, 1.18.0.qualifier]" diff --git a/java/ql/src/META-INF/MANIFEST.MF b/java/ql/src/META-INF/MANIFEST.MF index 2e9435ab9505..36fcecc0b66b 100644 --- a/java/ql/src/META-INF/MANIFEST.MF +++ b/java/ql/src/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle Default Java Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.queries;singleton:=true -Bundle-Version: 1.18.0.qualifier +Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier,1.18.0.qualifier]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" diff --git a/javascript/ql/src/META-INF/MANIFEST.MF b/javascript/ql/src/META-INF/MANIFEST.MF index fe4cf7cfb8cb..8dfe200b8b40 100644 --- a/javascript/ql/src/META-INF/MANIFEST.MF +++ b/javascript/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle JavaScript Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.javascript.queries;singleton:=true -Bundle-Version: 1.18.0.qualifier +Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier, 1.18.0.qualifier]" From fd91374b2f8ae3ec9c8d50e6163734d90fd19e88 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 26 Sep 2018 18:22:20 +0100 Subject: [PATCH 05/10] C++: Update test output --- cpp/ql/test/library-tests/templates/CPP-204/element.expected | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/ql/test/library-tests/templates/CPP-204/element.expected b/cpp/ql/test/library-tests/templates/CPP-204/element.expected index c8a874108efb..6c07e74e41c7 100644 --- a/cpp/ql/test/library-tests/templates/CPP-204/element.expected +++ b/cpp/ql/test/library-tests/templates/CPP-204/element.expected @@ -34,7 +34,6 @@ | test.cpp:8:31:8:35 | initializer for Value | | test.cpp:11:10:11:11 | mention of EC | | test.cpp:11:25:11:27 | mention of IsX | -| test.cpp:11:25:11:27 | mention of IsX | | test.cpp:12:8:12:9 | DX | | test.cpp:12:8:12:9 | definition of DX | | test.cpp:13:17:13:20 | Type | From c61b31168294cb154de5a9e1cd39a0f4a2b3d942 Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Thu, 27 Sep 2018 09:30:11 +0200 Subject: [PATCH 06/10] C++: Make unresolve dispatch on result, not this This change means that there are no results for `unresolveElement(t)` where `t` is a "junk type" -- a class definition that is not in the image of `resolveClass`. These "junk types" still exist as `Element`s, but they will never be returned by any predicate that goes through `unresolveElement` to query the db. We get a small reduction in DIL size and a significant speed improvement. The DIL for `NewArrayDeleteMismatch.ql` is reduced from 27,630 lines to 27,507 lines, and the total analysis time for the LGTM suite on jdk8u is reduced from 1158s to 984s. --- cpp/ql/src/semmle/code/cpp/Class.qll | 4 ---- cpp/ql/src/semmle/code/cpp/Element.qll | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/Class.qll b/cpp/ql/src/semmle/code/cpp/Class.qll index e2364744b145..a433c4ac7866 100644 --- a/cpp/ql/src/semmle/code/cpp/Class.qll +++ b/cpp/ql/src/semmle/code/cpp/Class.qll @@ -15,10 +15,6 @@ class Class extends UserType { isClass(this.underlying()) } - override @element unresolve() { - resolveClass(result) = this - } - /** Gets a child declaration of this class. */ override Declaration getADeclaration() { result = this.getAMember() } diff --git a/cpp/ql/src/semmle/code/cpp/Element.qll b/cpp/ql/src/semmle/code/cpp/Element.qll index 13f554960093..febb8609fcc1 100644 --- a/cpp/ql/src/semmle/code/cpp/Element.qll +++ b/cpp/ql/src/semmle/code/cpp/Element.qll @@ -70,7 +70,12 @@ class ElementBase extends @element { * See `underlying` for when the qualifier is `this`. */ pragma[inline] - @element unresolve() { result = this } + final @element unresolve() { + not result instanceof @usertype and + result = this + or + this = resolveClass(result) + } } /** From 0da452d59a1c0b7efad199dd321a31031b3fd45c Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Thu, 27 Sep 2018 10:35:04 +0200 Subject: [PATCH 07/10] C++: Revert object-orientation of unresolveElement The change to make `unresolveElement` a member predicate was helpful for the optimiser when it dispatched on `this`, but now that it "dispatches" on `result` it's just an unnecessary pollution of the `ElementBase` namespace. --- cpp/ql/src/semmle/code/cpp/Class.qll | 2 +- cpp/ql/src/semmle/code/cpp/Element.qll | 36 ++++--------------- cpp/ql/src/semmle/code/cpp/Type.qll | 2 +- .../src/semmle/code/cpp/pointsto/PointsTo.qll | 2 +- 4 files changed, 9 insertions(+), 33 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/Class.qll b/cpp/ql/src/semmle/code/cpp/Class.qll index a433c4ac7866..8d4414f03f38 100644 --- a/cpp/ql/src/semmle/code/cpp/Class.qll +++ b/cpp/ql/src/semmle/code/cpp/Class.qll @@ -12,7 +12,7 @@ private import semmle.code.cpp.internal.ResolveClass */ class Class extends UserType { Class() { - isClass(this.underlying()) + isClass(underlyingElement(this)) } /** Gets a child declaration of this class. */ diff --git a/cpp/ql/src/semmle/code/cpp/Element.qll b/cpp/ql/src/semmle/code/cpp/Element.qll index febb8609fcc1..10ad7135b0a6 100644 --- a/cpp/ql/src/semmle/code/cpp/Element.qll +++ b/cpp/ql/src/semmle/code/cpp/Element.qll @@ -10,7 +10,7 @@ private import semmle.code.cpp.internal.ResolveClass */ pragma[inline] Element mkElement(@element e) { - result.unresolve() = e + unresolveElement(result) = e } /** @@ -24,7 +24,10 @@ Element mkElement(@element e) { */ pragma[inline] @element unresolveElement(Element e) { - result = e.unresolve() + not result instanceof @usertype and + result = e + or + e = resolveClass(result) } /** @@ -35,13 +38,12 @@ pragma[inline] * need the result for an argument to a database extensional. * See `unresolveElement` for when `e` is not `this`. */ -pragma[inline] @element underlyingElement(Element e) { result = e } /** - * A C/C++ element with a minimal set of member predicates. Not for + * A C/C++ element with no member predicates other than `toString`. Not for * general use. This class does not define a location, so classes wanting to * change their location without affecting other classes can extend * `ElementBase` instead of `Element` to create a new rootdef for `getURL`, @@ -50,32 +52,6 @@ pragma[inline] class ElementBase extends @element { /** Gets a textual representation of this element. */ string toString() { none() } - - /** - * INTERNAL: Do not use. - * - * Gets the `@element` that this `Element` extends. This should normally only - * be called from member predicates on `this` where you need the result for - * an argument to a database extensional. - * See `unresolve` for when the qualifier is not `this`. - */ - final @element underlying() { result = this } - - /** - * INTERNAL: Do not use. - * - * Gets an `@element` that resolves to the `Element`. This should normally - * only be called from member predicates, where the qualifier is not `this` - * and you need the result for an argument to a database extensional. - * See `underlying` for when the qualifier is `this`. - */ - pragma[inline] - final @element unresolve() { - not result instanceof @usertype and - result = this - or - this = resolveClass(result) - } } /** diff --git a/cpp/ql/src/semmle/code/cpp/Type.qll b/cpp/ql/src/semmle/code/cpp/Type.qll index 3a78e6c7cf94..552e12369283 100644 --- a/cpp/ql/src/semmle/code/cpp/Type.qll +++ b/cpp/ql/src/semmle/code/cpp/Type.qll @@ -7,7 +7,7 @@ private import semmle.code.cpp.internal.ResolveClass * A C/C++ type. */ class Type extends Locatable, @type { - Type() { isType(this.underlying()) } + Type() { isType(underlyingElement(this)) } /** * Gets the name of this type. diff --git a/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll b/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll index 7c70fd50d505..6f1ab3758262 100644 --- a/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll +++ b/cpp/ql/src/semmle/code/cpp/pointsto/PointsTo.qll @@ -635,7 +635,7 @@ class PointsToExpr extends Expr { this.interesting() and exists(int set, @element thisEntity, @element resultEntity | - thisEntity = this.underlying() and + thisEntity = underlyingElement(this) and pointstosets(set, thisEntity) and setlocations(set, resultEntity) and resultEntity = localUnresolveElement(result) From 19435e07a1fb6a56d35bda84ef77d555c90bc106 Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Thu, 27 Sep 2018 14:07:13 +0200 Subject: [PATCH 08/10] C++: Fix join order in CommentedOutCode After the recent inlining of `unresolveElement`, the join order in `CommentedOutCode` became a problem. The join orderer was tempted to join the two `hasLocationInfo` calls first because they had one column in common. With this commit, they have no columns in common. It follows from the other predicates in the same file that this column would be the same, so there is no need to assert it in this predicate and risk that the join orderer uses that information. On Wireshark, the `CommentBlock::hasLocationInfo` predicate goes from taking 2m2s to taking 180ms. The query produces the same 7,448 alerts. --- cpp/ql/src/Documentation/CommentedOutCode.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Documentation/CommentedOutCode.qll b/cpp/ql/src/Documentation/CommentedOutCode.qll index c1097701bef7..3ecdb1a3252d 100644 --- a/cpp/ql/src/Documentation/CommentedOutCode.qll +++ b/cpp/ql/src/Documentation/CommentedOutCode.qll @@ -119,7 +119,7 @@ class CommentBlock extends Comment { */ predicate hasLocationInfo(string filepath, int startline, int startcolumn, int endline, int endcolumn) { this.getLocation().hasLocationInfo(filepath, startline, startcolumn, _, _) and - this.lastComment().getLocation().hasLocationInfo(filepath, _, _, endline, endcolumn) + this.lastComment().getLocation().hasLocationInfo(_, _, _, endline, endcolumn) } } From f5bd737adaff7cafe10d4dbe5f706a339ee70c5b Mon Sep 17 00:00:00 2001 From: Aditya Sharad Date: Fri, 28 Sep 2018 14:10:06 +0100 Subject: [PATCH 09/10] Version: Fix C# and JavaScript Eclipse plugins for 1.18. --- csharp/ql/src/META-INF/MANIFEST.MF | 2 +- javascript/ql/src/META-INF/MANIFEST.MF | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/META-INF/MANIFEST.MF b/csharp/ql/src/META-INF/MANIFEST.MF index 2dff4b6013ac..9efc255e762b 100644 --- a/csharp/ql/src/META-INF/MANIFEST.MF +++ b/csharp/ql/src/META-INF/MANIFEST.MF @@ -5,4 +5,4 @@ Bundle-SymbolicName: com.semmle.plugin.semmlecode.csharp.queries;singleton:=true Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier, 1.18.0.qualifier]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" diff --git a/javascript/ql/src/META-INF/MANIFEST.MF b/javascript/ql/src/META-INF/MANIFEST.MF index 8dfe200b8b40..f7842e43898a 100644 --- a/javascript/ql/src/META-INF/MANIFEST.MF +++ b/javascript/ql/src/META-INF/MANIFEST.MF @@ -5,4 +5,4 @@ Bundle-SymbolicName: com.semmle.plugin.semmlecode.javascript.queries;singleton:= Bundle-Version: 1.18.0 Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0.qualifier, 1.18.0.qualifier]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" From 1c71a856e10a2168ba8f083b5377c43e6095a393 Mon Sep 17 00:00:00 2001 From: Aditya Sharad Date: Fri, 28 Sep 2018 16:39:44 +0100 Subject: [PATCH 10/10] Version: Bump to 1.18.1 dev. --- cpp/ql/src/META-INF/MANIFEST.MF | 4 ++-- csharp/ql/src/META-INF/MANIFEST.MF | 4 ++-- java/ql/src/META-INF/MANIFEST.MF | 4 ++-- javascript/ql/src/META-INF/MANIFEST.MF | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpp/ql/src/META-INF/MANIFEST.MF b/cpp/ql/src/META-INF/MANIFEST.MF index 907b39deb610..f117922d2ef4 100644 --- a/cpp/ql/src/META-INF/MANIFEST.MF +++ b/cpp/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle C/C++ Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.cpp.queries;singleton:=true -Bundle-Version: 1.18.0 +Bundle-Version: 1.18.1.qualifier Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.1.qualifier,1.18.1.qualifier]" diff --git a/csharp/ql/src/META-INF/MANIFEST.MF b/csharp/ql/src/META-INF/MANIFEST.MF index 9efc255e762b..41a500e23d56 100644 --- a/csharp/ql/src/META-INF/MANIFEST.MF +++ b/csharp/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle C# Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.csharp.queries;singleton:=true -Bundle-Version: 1.18.0 +Bundle-Version: 1.18.1.qualifier Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.1.qualifier,1.18.1.qualifier]" diff --git a/java/ql/src/META-INF/MANIFEST.MF b/java/ql/src/META-INF/MANIFEST.MF index 36fcecc0b66b..17754c6ce38f 100644 --- a/java/ql/src/META-INF/MANIFEST.MF +++ b/java/ql/src/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle Default Java Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.queries;singleton:=true -Bundle-Version: 1.18.0 +Bundle-Version: 1.18.1.qualifier Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.1.qualifier,1.18.1.qualifier]" diff --git a/javascript/ql/src/META-INF/MANIFEST.MF b/javascript/ql/src/META-INF/MANIFEST.MF index f7842e43898a..9646c1b8ce45 100644 --- a/javascript/ql/src/META-INF/MANIFEST.MF +++ b/javascript/ql/src/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Semmle JavaScript Default Queries Bundle-SymbolicName: com.semmle.plugin.semmlecode.javascript.queries;singleton:=true -Bundle-Version: 1.18.0 +Bundle-Version: 1.18.1.qualifier Bundle-Vendor: Semmle Ltd. Bundle-ActivationPolicy: lazy -Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.0,1.18.0]" +Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.1.qualifier,1.18.1.qualifier]"