Skip to content

Commit 4df2e5d

Browse files
authored
Merge pull request #10096 from erik-krogh/acronyms-part1
make acronyms camelcase
2 parents 18ed9ed + 82a5b78 commit 4df2e5d

File tree

108 files changed

+779
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+779
-491
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
category: deprecated
33
---
4-
* Classes/predicates that had upper-case acronym XML in their name have been renamed to Xml to follow our style-guide.
4+
* Many classes/predicates/modules with upper-case acronyms in their name have been renamed to follow our style-guide.
55
The old name still exists as a deprecated alias.

cpp/ql/lib/semmle/code/cpp/XML.qll

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ class XmlFile extends XmlParent, File {
132132
XmlElement getARootElement() { result = this.getAChild() }
133133

134134
/** Gets a DTD associated with this XML file. */
135-
XmlDTD getADTD() { xmlDTDs(result, _, _, _, this) }
135+
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
136+
137+
/** DEPRECATED: Alias for getADtd */
138+
deprecated XmlDtd getADTD() { result = this.getADtd() }
136139
}
137140

138141
/** DEPRECATED: Alias for XmlFile */
@@ -149,7 +152,7 @@ deprecated class XMLFile = XmlFile;
149152
* <!ELEMENT lastName (#PCDATA)>
150153
* ```
151154
*/
152-
class XmlDTD extends XmlLocatable, @xmldtd {
155+
class XmlDtd extends XmlLocatable, @xmldtd {
153156
/** Gets the name of the root element of this DTD. */
154157
string getRoot() { xmlDTDs(this, result, _, _, _) }
155158

@@ -174,8 +177,8 @@ class XmlDTD extends XmlLocatable, @xmldtd {
174177
}
175178
}
176179

177-
/** DEPRECATED: Alias for XmlDTD */
178-
deprecated class XMLDTD = XmlDTD;
180+
/** DEPRECATED: Alias for XmlDtd */
181+
deprecated class XMLDTD = XmlDtd;
179182

180183
/**
181184
* An XML element in an XML file.
@@ -282,15 +285,18 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
282285
string getPrefix() { xmlNs(this, result, _, _) }
283286

284287
/** Gets the URI of this namespace. */
285-
string getURI() { xmlNs(this, _, result, _) }
288+
string getUri() { xmlNs(this, _, result, _) }
289+
290+
/** DEPRECATED: Alias for getUri */
291+
deprecated string getURI() { result = this.getUri() }
286292

287293
/** Holds if this namespace has no prefix. */
288294
predicate isDefault() { this.getPrefix() = "" }
289295

290296
override string toString() {
291-
this.isDefault() and result = this.getURI()
297+
this.isDefault() and result = this.getUri()
292298
or
293-
not this.isDefault() and result = this.getPrefix() + ":" + this.getURI()
299+
not this.isDefault() and result = this.getPrefix() + ":" + this.getUri()
294300
}
295301
}
296302

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import semmle.code.cpp.ir.internal.Overlap
33
private import semmle.code.cpp.ir.internal.IRCppLanguage as Language
44
private import semmle.code.cpp.Print
55
private import semmle.code.cpp.ir.implementation.unaliased_ssa.IR
6-
private import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.SSAConstruction as OldSSA
6+
private import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.SSAConstruction as OldSsa
77
private import semmle.code.cpp.ir.internal.IntegerConstant as Ints
88
private import semmle.code.cpp.ir.internal.IntegerInterval as Interval
99
private import semmle.code.cpp.ir.implementation.internal.OperandTag
@@ -572,7 +572,7 @@ private Overlap getVariableMemoryLocationOverlap(
572572
* Holds if the def/use information for the result of `instr` can be reused from the previous
573573
* iteration of the IR.
574574
*/
575-
predicate canReuseSsaForOldResult(Instruction instr) { OldSSA::canReuseSsaForMemoryResult(instr) }
575+
predicate canReuseSsaForOldResult(Instruction instr) { OldSsa::canReuseSsaForMemoryResult(instr) }
576576

577577
/** DEPRECATED: Alias for canReuseSsaForOldResult */
578578
deprecated predicate canReuseSSAForOldResult = canReuseSsaForOldResult/1;

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ private import Imports::OperandTag
55
private import Imports::Overlap
66
private import Imports::TInstruction
77
private import Imports::RawIR as RawIR
8-
private import SSAInstructions
9-
private import SSAOperands
8+
private import SsaInstructions
9+
private import SsaOperands
1010
private import NewIR
1111

1212
private class OldBlock = Reachability::ReachableBlock;

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstructionInternal.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as OldIR
22
import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.reachability.ReachableBlock as Reachability
33
import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.reachability.Dominance as Dominance
44
import semmle.code.cpp.ir.implementation.aliased_ssa.IR as NewIR
5-
import semmle.code.cpp.ir.implementation.internal.TInstruction::AliasedSsaInstructions as SSAInstructions
5+
import semmle.code.cpp.ir.implementation.internal.TInstruction::AliasedSsaInstructions as SsaInstructions
6+
7+
/** DEPRECATED: Alias for SsaInstructions */
8+
deprecated module SSAInstructions = SsaInstructions;
9+
610
import semmle.code.cpp.ir.internal.IRCppLanguage as Language
711
import AliasedSSA as Alias
8-
import semmle.code.cpp.ir.implementation.internal.TOperand::AliasedSsaOperands as SSAOperands
12+
import semmle.code.cpp.ir.implementation.internal.TOperand::AliasedSsaOperands as SsaOperands
13+
14+
/** DEPRECATED: Alias for SsaOperands */
15+
deprecated module SSAOperands = SsaOperands;

cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ newtype TInstruction =
2929
UnaliasedSsa::SSA::hasUnreachedInstruction(irFunc)
3030
} or
3131
TAliasedSsaPhiInstruction(
32-
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
32+
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
3333
) {
34-
AliasedSSA::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
34+
AliasedSsa::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
3535
} or
3636
TAliasedSsaChiInstruction(TRawInstruction primaryInstruction) {
37-
AliasedSSA::SSA::hasChiInstruction(primaryInstruction)
37+
AliasedSsa::SSA::hasChiInstruction(primaryInstruction)
3838
} or
3939
TAliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
40-
AliasedSSA::SSA::hasUnreachedInstruction(irFunc)
40+
AliasedSsa::SSA::hasUnreachedInstruction(irFunc)
4141
}
4242

4343
/**
@@ -83,7 +83,7 @@ module AliasedSsaInstructions {
8383
class TPhiInstruction = TAliasedSsaPhiInstruction or TUnaliasedSsaPhiInstruction;
8484

8585
TPhiInstruction phiInstruction(
86-
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
86+
TRawInstruction blockStartInstr, AliasedSsa::SSA::MemoryLocation memoryLocation
8787
) {
8888
result = TAliasedSsaPhiInstruction(blockStartInstr, memoryLocation)
8989
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import semmle.code.cpp.ir.internal.IRCppLanguage as Language
22
import semmle.code.cpp.ir.implementation.raw.internal.IRConstruction as IRConstruction
33
import semmle.code.cpp.ir.implementation.unaliased_ssa.internal.SSAConstruction as UnaliasedSsa
4-
import semmle.code.cpp.ir.implementation.aliased_ssa.internal.SSAConstruction as AliasedSSA
4+
import semmle.code.cpp.ir.implementation.aliased_ssa.internal.SSAConstruction as AliasedSsa
5+
6+
/** DEPRECATED: Alias for AliasedSsa */
7+
deprecated module AliasedSSA = AliasedSsa;

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ private import Imports::OperandTag
55
private import Imports::Overlap
66
private import Imports::TInstruction
77
private import Imports::RawIR as RawIR
8-
private import SSAInstructions
9-
private import SSAOperands
8+
private import SsaInstructions
9+
private import SsaOperands
1010
private import NewIR
1111

1212
private class OldBlock = Reachability::ReachableBlock;

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstructionInternal.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ import semmle.code.cpp.ir.implementation.raw.internal.reachability.ReachableBloc
33
import semmle.code.cpp.ir.implementation.raw.internal.reachability.Dominance as Dominance
44
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as NewIR
55
import semmle.code.cpp.ir.implementation.raw.internal.IRConstruction as RawStage
6-
import semmle.code.cpp.ir.implementation.internal.TInstruction::UnaliasedSsaInstructions as SSAInstructions
6+
import semmle.code.cpp.ir.implementation.internal.TInstruction::UnaliasedSsaInstructions as SsaInstructions
7+
8+
/** DEPRECATED: Alias for SsaInstructions */
9+
deprecated module SSAInstructions = SsaInstructions;
10+
711
import semmle.code.cpp.ir.internal.IRCppLanguage as Language
812
import SimpleSSA as Alias
9-
import semmle.code.cpp.ir.implementation.internal.TOperand::UnaliasedSsaOperands as SSAOperands
13+
import semmle.code.cpp.ir.implementation.internal.TOperand::UnaliasedSsaOperands as SsaOperands
14+
15+
/** DEPRECATED: Alias for SsaOperands */
16+
deprecated module SSAOperands = SsaOperands;

cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
2121
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
2222
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode;
2323

24+
/** An external API which is used with untrusted data. */
2425
private newtype TExternalApi =
26+
/** An untrusted API method `m` where untrusted data is passed at `index`. */
2527
TExternalApiParameter(Function f, int index) {
2628
exists(UntrustedExternalApiDataNode n |
2729
f = n.getExternalFunction() and

0 commit comments

Comments
 (0)