Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 460fb26

Browse filesBrowse files
committed
Reinstate macro instantiation results
1 parent a02baeb commit 460fb26
Copy full SHA for 460fb26

File tree

2 files changed

+1
-5
lines changed
Filter options

2 files changed

+1
-5
lines changed

‎c/misra/src/rules/RULE-8-13/PointerShouldPointToConstTypeWhenPossible.ql

Copy file name to clipboardExpand all lines: c/misra/src/rules/RULE-8-13/PointerShouldPointToConstTypeWhenPossible.ql
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class NonConstPointerVariableCandidate extends Variable {
3131
// In a type declared locally
3232
this.(Field).getDeclaringType+().getEnclosingFunction() = a.getEnclosingFunction()
3333
) and
34-
// Avoid elements in macro expansions, as they cannot be equated across copies
35-
not this.isInMacroExpansion() and
3634
exists(PointerOrArrayType type |
3735
// include only pointers which point to a const-qualified type
3836
this.getType() = type and

‎cpp/common/src/codingstandards/cpp/alertreporting/HoldsForAllCopies.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/alertreporting/HoldsForAllCopies.qll
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ module HoldsForAllCopies<CandidateElementSig CandidateElement, ElementSetSig Ele
8585
string filepath, int startline, int startcolumn, int endline, int endcolumn
8686
) {
8787
exists(CandidateElement s |
88-
// Only consider candidates where we can match up the location
89-
isNotWithinMacroExpansion(s) and
9088
hasLocation(s, filepath, startline, startcolumn, endline, endcolumn) and
9189
// All relevant elements that occur at the same location are candidates
92-
forex(RelevantElement relevantElement | s = relevantElement.getCandidateElement() |
90+
forall(RelevantElement relevantElement | s = relevantElement.getCandidateElement() |
9391
relevantElement instanceof CandidateElement
9492
)
9593
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.