mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
C++: Add a weird testcase demonstrating invalid IR.
This commit is contained in:
@@ -20,6 +20,7 @@ unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
operandAcrossFunctions
|
||||
| test.c:245:31:245:31 | Condition | Operand 'Condition' is used on instruction 'ConditionalBranch: 0' in function '$@', but is defined on instruction 'Constant: 0' in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> | test.c:245:24:245:24 | const void *[] a | const void *[] a |
|
||||
instructionWithoutUniqueBlock
|
||||
containsLoopOfForwardEdges
|
||||
lostReachability
|
||||
@@ -30,6 +31,7 @@ notMarkedAsConflated
|
||||
wronglyMarkedAsConflated
|
||||
invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
| test.c:245:31:245:31 | ConditionalBranch: 0 | Instruction 'ConditionalBranch: 0' has 0 results for `getEnclosingIRFunction()` in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> |
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| pmcallexpr.cpp:10:2:10:15 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pmcallexpr.cpp:8:13:8:13 | void f() | void f() |
|
||||
|
||||
@@ -33,6 +33,7 @@ unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
operandAcrossFunctions
|
||||
| test.c:245:31:245:31 | Condition | Operand 'Condition' is used on instruction 'ConditionalBranch: 0' in function '$@', but is defined on instruction 'Constant: 0' in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> | test.c:245:24:245:24 | const void *[] a | const void *[] a |
|
||||
instructionWithoutUniqueBlock
|
||||
containsLoopOfForwardEdges
|
||||
lostReachability
|
||||
@@ -52,6 +53,7 @@ notMarkedAsConflated
|
||||
wronglyMarkedAsConflated
|
||||
invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
| test.c:245:31:245:31 | ConditionalBranch: 0 | Instruction 'ConditionalBranch: 0' has 0 results for `getEnclosingIRFunction()` in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> |
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| pmcallexpr.cpp:10:2:10:15 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pmcallexpr.cpp:8:13:8:13 | void f() | void f() |
|
||||
|
||||
@@ -233,3 +233,14 @@ void f_if_ternary_1(int b, int x, int y) {
|
||||
if (b ? x : y) {
|
||||
}
|
||||
}
|
||||
|
||||
struct _A
|
||||
{
|
||||
unsigned int x;
|
||||
const char *y;
|
||||
} as[];
|
||||
|
||||
void regression_test(void)
|
||||
{
|
||||
static const void *a[] = {0 ? 0 : as};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
operandAcrossFunctions
|
||||
| test.c:245:31:245:31 | Condition | Operand 'Condition' is used on instruction 'ConditionalBranch: 0' in function '$@', but is defined on instruction 'Constant: 0' in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> | test.c:245:24:245:24 | const void *[] a | const void *[] a |
|
||||
instructionWithoutUniqueBlock
|
||||
containsLoopOfForwardEdges
|
||||
lostReachability
|
||||
@@ -30,6 +31,7 @@ notMarkedAsConflated
|
||||
wronglyMarkedAsConflated
|
||||
invalidOverlap
|
||||
nonUniqueEnclosingIRFunction
|
||||
| test.c:245:31:245:31 | ConditionalBranch: 0 | Instruction 'ConditionalBranch: 0' has 0 results for `getEnclosingIRFunction()` in function '$@'. | file://:0:0:0:0 | <Missing IRFunction> | <Missing IRFunction> |
|
||||
fieldAddressOnNonPointer
|
||||
thisArgumentIsNonPointer
|
||||
| pmcallexpr.cpp:10:2:10:15 | Call: call to expression | Call instruction 'Call: call to expression' has a `this` argument operand that is not an address, in function '$@'. | pmcallexpr.cpp:8:13:8:13 | void f() | void f() |
|
||||
|
||||
Reference in New Issue
Block a user