зеркало из https://github.com/github/codeql.git
Merge pull request #1796 from mgrettondann/enable-usingentry-getenclosingelement
C++: Add support for UsingEntry.getEnclosingElement
This commit is contained in:
Коммит
bea1f687e7
|
@ -206,7 +206,8 @@ class Element extends ElementBase {
|
|||
namequalifiers(underlyingElement(this), unresolveElement(result), _, _) or
|
||||
initialisers(underlyingElement(this), unresolveElement(result), _, _) or
|
||||
exprconv(unresolveElement(result), underlyingElement(this)) or
|
||||
param_decl_bind(underlyingElement(this),_,unresolveElement(result))
|
||||
param_decl_bind(underlyingElement(this),_,unresolveElement(result)) or
|
||||
using_container(unresolveElement(result),underlyingElement(this))
|
||||
}
|
||||
|
||||
/** Gets the closest `Element` enclosing this one. */
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
| templates.cpp:9:5:9:14 | using c | file://:0:0:0:0 | std |
|
||||
| usings.cpp:8:1:8:11 | using nf | file://:0:0:0:0 | (global namespace) |
|
||||
| usings.cpp:9:1:9:17 | using namespace N | file://:0:0:0:0 | (global namespace) |
|
||||
| usings.cpp:18:3:18:13 | using bf | usings.cpp:16:8:16:8 | D |
|
||||
| usings.cpp:21:5:21:14 | using gf | usings.cpp:20:13:23:3 | { ... } |
|
||||
| usings.cpp:34:3:34:20 | using tbf | usings.cpp:32:8:32:9 | TD |
|
||||
| usings.cpp:42:5:42:22 | using foo | usings.cpp:41:11:41:15 | nsbar |
|
|
@ -0,0 +1,6 @@
|
|||
import cpp
|
||||
|
||||
from UsingEntry ue, Element e
|
||||
where
|
||||
e = ue.getEnclosingElement()
|
||||
select ue, e
|
Загрузка…
Ссылка в новой задаче