|
| 1 | +/** |
| 2 | + * Provides models of functions in <memory> that deals with uninitialized memory. |
| 3 | + */ |
| 4 | + |
| 5 | +import cpp |
| 6 | + |
| 7 | +abstract class UninitializedMemoryManagementFunction extends Function { |
| 8 | + UninitializedMemoryManagementFunction() { |
| 9 | + this.getADeclarationLocation().getFile().getShortName() = "memory" |
| 10 | + } |
| 11 | +} |
| 12 | + |
| 13 | +class UninitializedCopyFunction extends UninitializedMemoryManagementFunction { |
| 14 | + UninitializedCopyFunction() { this.hasQualifiedName("std", "uninitialized_copy") } |
| 15 | +} |
| 16 | + |
| 17 | +class UninitializedCopyNFunction extends UninitializedMemoryManagementFunction { |
| 18 | + UninitializedCopyNFunction() { this.hasQualifiedName("std", "uninitialized_copy_n") } |
| 19 | +} |
| 20 | + |
| 21 | +class UninitializedDefaultConstructFunction extends UninitializedMemoryManagementFunction { |
| 22 | + UninitializedDefaultConstructFunction() { |
| 23 | + this.hasQualifiedName("std", "uninitialized_default_construct") |
| 24 | + } |
| 25 | +} |
| 26 | + |
| 27 | +class UninitializedDefaultConstructNFunction extends UninitializedMemoryManagementFunction { |
| 28 | + UninitializedDefaultConstructNFunction() { |
| 29 | + this.hasQualifiedName("std", "uninitialized_default_construct_n") |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +class UninitializedValueConstructFunction extends UninitializedMemoryManagementFunction { |
| 34 | + UninitializedValueConstructFunction() { |
| 35 | + this.hasQualifiedName("std", "uninitialized_value_construct") |
| 36 | + } |
| 37 | +} |
| 38 | + |
| 39 | +class UninitializedValueConstructNFunction extends UninitializedMemoryManagementFunction { |
| 40 | + UninitializedValueConstructNFunction() { |
| 41 | + this.hasQualifiedName("std", "uninitialized_value_construct_n") |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +class UninitializedMoveFunction extends UninitializedMemoryManagementFunction { |
| 46 | + UninitializedMoveFunction() { this.hasQualifiedName("std", "uninitialized_move") } |
| 47 | +} |
| 48 | + |
| 49 | +class UninitializedMoveNFunction extends UninitializedMemoryManagementFunction { |
| 50 | + UninitializedMoveNFunction() { this.hasQualifiedName("std", "uninitialized_move_n") } |
| 51 | +} |
| 52 | + |
| 53 | +class UninitializedFillFunction extends UninitializedMemoryManagementFunction { |
| 54 | + UninitializedFillFunction() { this.hasQualifiedName("std", "uninitialized_fill") } |
| 55 | +} |
| 56 | + |
| 57 | +class UninitializedFillNFunction extends UninitializedMemoryManagementFunction { |
| 58 | + UninitializedFillNFunction() { this.hasQualifiedName("std", "uninitialized_fill_n") } |
| 59 | +} |
| 60 | + |
| 61 | +class DestroyFunction extends UninitializedMemoryManagementFunction { |
| 62 | + DestroyFunction() { this.hasQualifiedName("std", "destroy") } |
| 63 | +} |
| 64 | + |
| 65 | +class DestroyNFunction extends UninitializedMemoryManagementFunction { |
| 66 | + DestroyNFunction() { this.hasQualifiedName("std", "destroy_n") } |
| 67 | +} |
| 68 | + |
| 69 | +class DestroyAtFunction extends UninitializedMemoryManagementFunction { |
| 70 | + DestroyAtFunction() { this.hasQualifiedName("std", "destroy_at") } |
| 71 | +} |
| 72 | + |
| 73 | +class LaunderFunction extends UninitializedMemoryManagementFunction { |
| 74 | + LaunderFunction() { this.hasQualifiedName("std", "launder") } |
| 75 | +} |
0 commit comments