mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Reshuffle IR files into a consistent directory structure
There are no real code changes here, other than to fix up `import`s. All tests still hae the same output, as expected. A future commit will hide the IR flavors other than the one we want queries to use directly.
This commit is contained in:
@@ -1,58 +1,58 @@
|
||||
{
|
||||
"C++ IR Instruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/Instruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/Instruction.qll"
|
||||
],
|
||||
"C++ IR IRBlock": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/IRBlock.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRBlock.qll"
|
||||
],
|
||||
"C++ IR IRVariable": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/IRVariable.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRVariable.qll"
|
||||
],
|
||||
"C++ IR FunctionIR": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/FunctionIR.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/FunctionIR.qll"
|
||||
],
|
||||
"C++ IR OperandTag": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/OperandTag.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/OperandTag.qll"
|
||||
],
|
||||
"C++ IR IRImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/IRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/IRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/IRImpl.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRImpl.qll"
|
||||
],
|
||||
"C++ IR IRSanityImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/IRSanityImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/IRSanityImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/IRSanityImpl.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRSanityImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRSanityImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRSanityImpl.qll"
|
||||
],
|
||||
"C++ IR PrintIRImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/PrintIRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/PrintIRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/PrintIRImpl.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/PrintIRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/PrintIRImpl.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/PrintIRImpl.qll"
|
||||
],
|
||||
"C++ SSA AliasAnalysis": [
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/AliasAnalysis.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/AliasAnalysis.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/AliasAnalysis.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/AliasAnalysis.qll"
|
||||
],
|
||||
"C++ SSA SimpleSSA": [
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/SimpleSSA.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/SimpleSSA.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/SimpleSSA.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/SimpleSSA.qll"
|
||||
],
|
||||
"C++ SSA IRBlockConstruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/IRBlockConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/IRBlockConstruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRBlockConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRBlockConstruction.qll"
|
||||
],
|
||||
"C++ SSA SSAConstruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/SSAConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/SSAConstruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/SSAConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/SSAConstruction.qll"
|
||||
]
|
||||
}
|
||||
|
||||
1
cpp/ql/src/semmle/code/cpp/ir/AliasedSSAIR.qll
Normal file
1
cpp/ql/src/semmle/code/cpp/ir/AliasedSSAIR.qll
Normal file
@@ -0,0 +1 @@
|
||||
import internal.aliased_ssa_ir.IRImpl
|
||||
@@ -5,4 +5,4 @@
|
||||
* @id cpp/aliased-ssa-ir-sanity-check
|
||||
*/
|
||||
|
||||
import internal.aliased_ssa.IRSanityImpl
|
||||
import internal.aliased_ssa_ir.IRSanityImpl
|
||||
@@ -1 +1 @@
|
||||
import internal.IRImpl
|
||||
import internal.raw_ir.IRImpl
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* @id cpp/ir-sanity-check
|
||||
*/
|
||||
|
||||
import internal.IRSanityImpl
|
||||
import internal.raw_ir.IRSanityImpl
|
||||
|
||||
1
cpp/ql/src/semmle/code/cpp/ir/PrintAliasedSSAIR.qll
Normal file
1
cpp/ql/src/semmle/code/cpp/ir/PrintAliasedSSAIR.qll
Normal file
@@ -0,0 +1 @@
|
||||
import internal.aliased_ssa_ir.PrintIRImpl
|
||||
@@ -1 +1 @@
|
||||
import internal.PrintIRImpl
|
||||
import internal.raw_ir.PrintIRImpl
|
||||
|
||||
1
cpp/ql/src/semmle/code/cpp/ir/PrintSSAIR.qll
Normal file
1
cpp/ql/src/semmle/code/cpp/ir/PrintSSAIR.qll
Normal file
@@ -0,0 +1 @@
|
||||
import internal.ssa_ir.PrintIRImpl
|
||||
1
cpp/ql/src/semmle/code/cpp/ir/SSAIR.qll
Normal file
1
cpp/ql/src/semmle/code/cpp/ir/SSAIR.qll
Normal file
@@ -0,0 +1 @@
|
||||
import internal.ssa_ir.IRImpl
|
||||
@@ -5,4 +5,4 @@
|
||||
* @id cpp/ssa-ir-sanity-check
|
||||
*/
|
||||
|
||||
import internal.ssa.IRSanityImpl
|
||||
import internal.ssa_ir.IRSanityImpl
|
||||
@@ -1,7 +1,7 @@
|
||||
private import AliasAnalysisInternal
|
||||
import cpp
|
||||
private import IR
|
||||
private import semmle.code.cpp.ssa.internal.IntegerConstant as Ints
|
||||
private import semmle.code.cpp.ir.internal.IntegerConstant as Ints
|
||||
|
||||
private class IntValue = Ints::IntValue;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import semmle.code.cpp.ir.internal.ssa_ir.IRImpl as IR
|
||||
@@ -0,0 +1,3 @@
|
||||
import semmle.code.cpp.ir.internal.ssa_ir.IRImpl as OldIR
|
||||
import semmle.code.cpp.ir.internal.aliased_ssa_ir.IRImpl as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -2,7 +2,7 @@ import SimpleSSAInternal
|
||||
import cpp
|
||||
import Alias
|
||||
import IR
|
||||
import semmle.code.cpp.ssa.internal.Overlap
|
||||
import semmle.code.cpp.ir.internal.Overlap
|
||||
|
||||
private newtype TVirtualVariable =
|
||||
MkVirtualVariable(IRVariable var) {
|
||||
@@ -0,0 +1,3 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.internal.ssa_ir.IRImpl as IR
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.IR
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import TempVariableTag
|
||||
private import TranslatedElement
|
||||
private import TranslatedFunction
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TranslatedElement
|
||||
private import TranslatedExpr
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TranslatedElement
|
||||
private import TranslatedExpr
|
||||
private import TranslatedInitialization
|
||||
@@ -1,8 +1,8 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.IR
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TempVariableTag
|
||||
private import TranslatedCondition
|
||||
private import TranslatedFunction
|
||||
private import TranslatedStmt
|
||||
@@ -1,7 +1,7 @@
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TempVariableTag
|
||||
private import TranslatedCondition
|
||||
private import TranslatedElement
|
||||
private import TranslatedFunction
|
||||
@@ -1,8 +1,8 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.IR
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TempVariableTag
|
||||
private import TranslatedElement
|
||||
private import TranslatedExpr
|
||||
private import TranslatedInitialization
|
||||
@@ -1,6 +1,6 @@
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.internal.Opcode
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TranslatedElement
|
||||
private import TranslatedExpr
|
||||
private import TranslatedFunction
|
||||
@@ -1,6 +1,6 @@
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import Opcode
|
||||
private import TranslatedCondition
|
||||
private import TranslatedDeclarationEntry
|
||||
private import TranslatedElement
|
||||
@@ -1,7 +1,7 @@
|
||||
private import AliasAnalysisInternal
|
||||
import cpp
|
||||
private import IR
|
||||
private import semmle.code.cpp.ssa.internal.IntegerConstant as Ints
|
||||
private import semmle.code.cpp.ir.internal.IntegerConstant as Ints
|
||||
|
||||
private class IntValue = Ints::IntValue;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl as IR
|
||||
@@ -0,0 +1,3 @@
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl as OldIR
|
||||
import semmle.code.cpp.ir.internal.ssa_ir.IRImpl as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -2,7 +2,7 @@ import SimpleSSAInternal
|
||||
import cpp
|
||||
import Alias
|
||||
import IR
|
||||
import semmle.code.cpp.ssa.internal.Overlap
|
||||
import semmle.code.cpp.ir.internal.Overlap
|
||||
|
||||
private newtype TVirtualVariable =
|
||||
MkVirtualVariable(IRVariable var) {
|
||||
@@ -0,0 +1,3 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.internal.raw_ir.IRImpl as IR
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import internal.aliased_ssa.IRImpl
|
||||
@@ -1 +0,0 @@
|
||||
import internal.aliased_ssa.PrintIRImpl
|
||||
@@ -1 +0,0 @@
|
||||
import internal.ssa.PrintIRImpl
|
||||
@@ -1 +0,0 @@
|
||||
import internal.ssa.IRImpl
|
||||
@@ -1 +0,0 @@
|
||||
import semmle.code.cpp.ssa.SSAIR as IR
|
||||
@@ -1,3 +0,0 @@
|
||||
import semmle.code.cpp.ssa.SSAIR as OldIR
|
||||
import semmle.code.cpp.ssa.AliasedSSAIR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -1,3 +0,0 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ssa.SSAIR as IR
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import semmle.code.cpp.ir.IR as IR
|
||||
@@ -1,3 +0,0 @@
|
||||
import semmle.code.cpp.ir.IR as OldIR
|
||||
import semmle.code.cpp.ssa.SSAIR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -1,3 +0,0 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.IR as IR
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import default
|
||||
import semmle.code.cpp.ssa.SSAIR
|
||||
import semmle.code.cpp.ssa.internal.IntegerConstant
|
||||
import semmle.code.cpp.ir.SSAIR
|
||||
import semmle.code.cpp.ir.internal.IntegerConstant
|
||||
|
||||
language[monotonicAggregates]
|
||||
IntValue getConstantValue(Instruction instr) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ssa/AliasedSSAIRSanity.ql
|
||||
semmle/code/cpp/ir/AliasedSSAIRSanity.ql
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ssa/SSAIRSanity.ql
|
||||
semmle/code/cpp/ir/SSAIRSanity.ql
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ssa/PrintAliasedSSAIR.ql
|
||||
semmle/code/cpp/ir/PrintAliasedSSAIR.ql
|
||||
@@ -1,5 +1,5 @@
|
||||
import default
|
||||
import semmle.code.cpp.ssa.SSAIR
|
||||
import semmle.code.cpp.ir.SSAIR
|
||||
|
||||
from FunctionIR funcIR
|
||||
select funcIR.toString(), count(funcIR.getABlock())
|
||||
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ssa/PrintSSAIR.ql
|
||||
semmle/code/cpp/ir/PrintSSAIR.ql
|
||||
Reference in New Issue
Block a user