mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Merge branch 'next' into qlucie/master
This commit is contained in:
@@ -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.19.0.qualifier
|
||||
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.19.0.qualifier,1.19.0.qualifier]"
|
||||
|
||||
@@ -418,6 +418,12 @@ class Class extends UserType {
|
||||
*/
|
||||
predicate isPOD() { is_pod_class(underlyingElement(this)) }
|
||||
|
||||
/**
|
||||
* Holds if this class is a standard-layout class [N4140 9(7)]. Also holds
|
||||
* for structs in C programs.
|
||||
*/
|
||||
predicate isStandardLayout() { is_standard_layout_class(underlyingElement(this)) }
|
||||
|
||||
/**
|
||||
* Holds if this class is abstract, in other words whether it declares one
|
||||
* or more pure virtual member functions.
|
||||
|
||||
@@ -202,6 +202,27 @@ class BuiltInOperationBuiltInShuffleVector extends BuiltInOperation, @builtinshu
|
||||
override string toString() { result = "__builtin_shufflevector" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A clang `__builtin_convertvector` expression.
|
||||
*/
|
||||
class BuiltInOperationBuiltInConvertVector extends BuiltInOperation, @builtinconvertvector {
|
||||
override string toString() { result = "__builtin_convertvector" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A clang `__builtin_addressof` expression (can be used to implement C++'s std::addressof).
|
||||
*/
|
||||
class BuiltInOperationBuiltInAddressOf extends UnaryOperation, BuiltInOperation, @builtinaddressof {
|
||||
/** Gets the function or variable whose address is taken. */
|
||||
Declaration getAddressable() {
|
||||
result = this.getOperand().(Access).getTarget()
|
||||
// this handles the case where we are taking the address of a reference variable
|
||||
or result = this.getOperand().(ReferenceDereferenceExpr).getChild(0).(Access).getTarget()
|
||||
}
|
||||
|
||||
override string getOperator() { result = "__builtin_addressof" }
|
||||
}
|
||||
|
||||
/**
|
||||
* The `__is_trivially_constructible` type trait.
|
||||
*/
|
||||
@@ -369,3 +390,10 @@ class BuiltInOperationIsFinal extends BuiltInOperation, @isfinalexpr {
|
||||
class BuiltInChooseExpr extends BuiltInOperation, @builtinchooseexpr {
|
||||
override string toString() { result = "__builtin_choose_expr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill operation on a GNU vector.
|
||||
*/
|
||||
class VectorFillOperation extends UnaryOperation, @vec_fill {
|
||||
override string getOperator() { result = "(vector fill)" }
|
||||
}
|
||||
|
||||
@@ -691,6 +691,7 @@ usertype_uuid(
|
||||
);
|
||||
|
||||
is_pod_class(unique int id: @usertype ref);
|
||||
is_standard_layout_class(unique int id: @usertype ref);
|
||||
|
||||
is_complete(unique int id: @usertype ref);
|
||||
|
||||
@@ -1429,6 +1430,9 @@ case @expr.kind of
|
||||
| 319 = @noexceptexpr
|
||||
| 320 = @builtinshufflevector
|
||||
| 321 = @builtinchooseexpr
|
||||
| 322 = @builtinaddressof
|
||||
| 323 = @vec_fill
|
||||
| 324 = @builtinconvertvector
|
||||
;
|
||||
|
||||
new_allocated_type(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user