mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C++: Add a failing testcase.
This commit is contained in:
@@ -20198,6 +20198,28 @@ ir.cpp:
|
||||
# 2430| Type = [ClassTemplateInstantiation,Struct] iterator<random_access_iterator_tag, char, ptrdiff_t, char *, char &>
|
||||
# 2430| ValueCategory = lvalue
|
||||
# 2432| getStmt(6): [ReturnStmt] return ...
|
||||
# 2434| [TopLevelFunction] void rethrow_with_destruction(int)
|
||||
# 2434| <params>:
|
||||
# 2434| getParameter(0): [Parameter] x
|
||||
# 2434| Type = [IntType] int
|
||||
# 2434| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2435| getStmt(0): [DeclStmt] declaration
|
||||
# 2435| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c
|
||||
# 2435| Type = [Class] ClassWithDestructor
|
||||
# 2435| getVariable().getInitializer(): [Initializer] initializer for c
|
||||
# 2435| getExpr(): [ConstructorCall] call to ClassWithDestructor
|
||||
# 2435| Type = [VoidType] void
|
||||
# 2435| ValueCategory = prvalue
|
||||
# 2436| getStmt(1): [ExprStmt] ExprStmt
|
||||
# 2436| getExpr(): [ReThrowExpr] re-throw exception
|
||||
# 2436| Type = [VoidType] void
|
||||
# 2436| ValueCategory = prvalue
|
||||
# 2437| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
|
||||
# 2437| Type = [VoidType] void
|
||||
# 2437| ValueCategory = prvalue
|
||||
# 2437| getQualifier(): [VariableAccess] c
|
||||
# 2437| Type = [Class] ClassWithDestructor
|
||||
# 2437| ValueCategory = lvalue
|
||||
perf-regression.cpp:
|
||||
# 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&)
|
||||
# 4| <params>:
|
||||
|
||||
@@ -15901,6 +15901,24 @@ ir.cpp:
|
||||
# 2410| Block 13
|
||||
# 2410| v2410_8(void) = Unreached :
|
||||
|
||||
# 2434| void rethrow_with_destruction(int)
|
||||
# 2434| Block 0
|
||||
# 2434| v2434_1(void) = EnterFunction :
|
||||
# 2434| m2434_2(unknown) = AliasedDefinition :
|
||||
# 2434| m2434_3(unknown) = InitializeNonLocal :
|
||||
# 2434| m2434_4(unknown) = Chi : total:m2434_2, partial:m2434_3
|
||||
# 2434| r2434_5(glval<int>) = VariableAddress[x] :
|
||||
# 2434| m2434_6(int) = InitializeParameter[x] : &:r2434_5
|
||||
# 2435| r2435_1(glval<ClassWithDestructor>) = VariableAddress[c] :
|
||||
# 2435| m2435_2(ClassWithDestructor) = Uninitialized[c] : &:r2435_1
|
||||
# 2435| r2435_3(glval<unknown>) = FunctionAddress[ClassWithDestructor] :
|
||||
# 2435| v2435_4(void) = Call[ClassWithDestructor] : func:r2435_3, this:r2435_1
|
||||
# 2435| m2435_5(unknown) = ^CallSideEffect : ~m2434_4
|
||||
# 2435| m2435_6(unknown) = Chi : total:m2434_4, partial:m2435_5
|
||||
# 2435| m2435_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2435_1
|
||||
# 2435| m2435_8(ClassWithDestructor) = Chi : total:m2435_2, partial:m2435_7
|
||||
# 2436| v2436_1(void) = ReThrow :
|
||||
|
||||
perf-regression.cpp:
|
||||
# 6| void Big::Big()
|
||||
# 6| Block 0
|
||||
|
||||
@@ -6,6 +6,7 @@ missingOperandType
|
||||
duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2436:5:2436:9 | ReThrow: re-throw exception | Instruction 'ReThrow: re-throw exception ' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -9,6 +9,7 @@ missingOperandType
|
||||
duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2436:5:2436:9 | ReThrow: re-throw exception | Instruction 'ReThrow: re-throw exception ' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -2431,4 +2431,9 @@ void initialization_with_temp_destructor() {
|
||||
y += x;
|
||||
}
|
||||
|
||||
void rethrow_with_destruction(int x) {
|
||||
ClassWithDestructor c;
|
||||
throw;
|
||||
}
|
||||
|
||||
// semmle-extractor-options: -std=c++20 --clang
|
||||
|
||||
@@ -13367,6 +13367,18 @@
|
||||
| ir.cpp:2431:14:2431:14 | Load | m2430_25 |
|
||||
| ir.cpp:2431:14:2431:14 | Right | r2431_3 |
|
||||
| ir.cpp:2431:14:2431:14 | Unary | r2431_2 |
|
||||
| ir.cpp:2434:6:2434:29 | ChiPartial | partial:m2434_3 |
|
||||
| ir.cpp:2434:6:2434:29 | ChiTotal | total:m2434_2 |
|
||||
| ir.cpp:2434:35:2434:35 | Address | &:r2434_5 |
|
||||
| ir.cpp:2435:25:2435:25 | Address | &:r2435_1 |
|
||||
| ir.cpp:2435:25:2435:25 | Address | &:r2435_1 |
|
||||
| ir.cpp:2435:25:2435:25 | Arg(this) | this:r2435_1 |
|
||||
| ir.cpp:2435:25:2435:25 | CallTarget | func:r2435_3 |
|
||||
| ir.cpp:2435:25:2435:25 | ChiPartial | partial:m2435_5 |
|
||||
| ir.cpp:2435:25:2435:25 | ChiPartial | partial:m2435_7 |
|
||||
| ir.cpp:2435:25:2435:25 | ChiTotal | total:m2434_4 |
|
||||
| ir.cpp:2435:25:2435:25 | ChiTotal | total:m2435_2 |
|
||||
| ir.cpp:2435:25:2435:25 | SideEffect | ~m2434_4 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
|
||||
| perf-regression.cpp:6:3:6:5 | Address | &:r6_7 |
|
||||
|
||||
@@ -6,6 +6,8 @@ missingOperandType
|
||||
duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2436:5:2436:9 | ReThrow: re-throw exception | Instruction 'ReThrow: re-throw exception ' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
| ir.cpp:2437:1:2437:1 | IndirectMayWriteSideEffect: c | Instruction 'IndirectMayWriteSideEffect: c' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -14644,6 +14644,41 @@ ir.cpp:
|
||||
# 2410| v2410_5(void) = AliasedUse : ~m?
|
||||
# 2410| v2410_6(void) = ExitFunction :
|
||||
|
||||
# 2434| void rethrow_with_destruction(int)
|
||||
# 2434| Block 0
|
||||
# 2434| v2434_1(void) = EnterFunction :
|
||||
# 2434| mu2434_2(unknown) = AliasedDefinition :
|
||||
# 2434| mu2434_3(unknown) = InitializeNonLocal :
|
||||
# 2434| r2434_4(glval<int>) = VariableAddress[x] :
|
||||
# 2434| mu2434_5(int) = InitializeParameter[x] : &:r2434_4
|
||||
# 2435| r2435_1(glval<ClassWithDestructor>) = VariableAddress[c] :
|
||||
# 2435| mu2435_2(ClassWithDestructor) = Uninitialized[c] : &:r2435_1
|
||||
# 2435| r2435_3(glval<unknown>) = FunctionAddress[ClassWithDestructor] :
|
||||
# 2435| v2435_4(void) = Call[ClassWithDestructor] : func:r2435_3, this:r2435_1
|
||||
# 2435| mu2435_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2435| mu2435_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2435_1
|
||||
# 2436| v2436_1(void) = ReThrow :
|
||||
|
||||
# 2434| Block 1
|
||||
# 2434| v2434_6(void) = AliasedUse : ~m?
|
||||
# 2434| v2434_7(void) = ExitFunction :
|
||||
|
||||
# 2434| Block 2
|
||||
# 2434| v2434_8(void) = ReturnVoid :
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2434| Block 3
|
||||
# 2434| v2434_9(void) = Unwind :
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2437| Block 4
|
||||
# 2437| r2437_1(glval<ClassWithDestructor>) = VariableAddress[c] :
|
||||
# 2437| r2437_2(glval<unknown>) = FunctionAddress[~ClassWithDestructor] :
|
||||
# 2437| v2437_3(void) = Call[~ClassWithDestructor] : func:r2437_2, this:r2437_1
|
||||
# 2437| mu2437_4(unknown) = ^CallSideEffect : ~m?
|
||||
# 2437| v2437_5(void) = ^IndirectReadSideEffect[-1] : &:r2437_1, ~m?
|
||||
# 2437| mu2437_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2437_1
|
||||
|
||||
perf-regression.cpp:
|
||||
# 6| void Big::Big()
|
||||
# 6| Block 0
|
||||
|
||||
@@ -6,6 +6,7 @@ missingOperandType
|
||||
duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2436:5:2436:9 | ReThrow: re-throw exception | Instruction 'ReThrow: re-throw exception ' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -6,6 +6,7 @@ missingOperandType
|
||||
duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2436:5:2436:9 | ReThrow: re-throw exception | Instruction 'ReThrow: re-throw exception ' has no successors in function '$@'. | ir.cpp:2434:6:2434:29 | void rethrow_with_destruction(int) | void rethrow_with_destruction(int) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
Reference in New Issue
Block a user