Skip to content

Commit 01ce344

Browse files
authored
Merge pull request #1530 from Semmle/getExpr-qldoc
C++: expand MacroInvocation.getExpr QLDoc
2 parents 5ea6960 + bf99a0e commit 01ce344

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/ql/src/semmle/code/cpp/Macro.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,12 @@ class MacroInvocation extends MacroAccess {
188188
}
189189

190190
/**
191-
* Gets the top-level expression associated with this macro invocation,
191+
* Gets a top-level expression associated with this macro invocation,
192192
* if any. Note that this predicate will fail if the top-level expanded
193193
* element is not an expression (for example if it is a statement).
194+
*
195+
* This macro is intended to be used with macros that expand to a complete
196+
* expression. In other cases, it may have multiple results or no results.
194197
*/
195198
Expr getExpr() {
196199
result = getAnExpandedElement() and

0 commit comments

Comments
 (0)