mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #84 from rdmarsh2/rdmarsh/cpp/macro-get-expr-conversions
C++: exclude conversion in MacroInvocation.getExpr
This commit is contained in:
@@ -178,7 +178,8 @@ class MacroInvocation extends MacroAccess {
|
||||
*/
|
||||
Expr getExpr() {
|
||||
result = getAnExpandedElement() and
|
||||
not (result.getParent() = getAnExpandedElement())
|
||||
not (result.getParent() = getAnExpandedElement()) and
|
||||
not result instanceof Conversion
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | 2 | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | 3 | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | 4 | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | (...) | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() getExpr() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | (...) | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() getExpr() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | (...) | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | (...) | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | ... * ... | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() getExpr() |
|
||||
| macroinvocations.cpp:123:10:123:19 | MACRO_EXPR | macroinvocations.cpp:123:10:123:19 | ... + ... | getAGeneratedElement() getAnAffectedElement() getAnExpandedElement() |
|
||||
|
||||
Reference in New Issue
Block a user