Skip to content

Commit 312ead4

Browse files
authored
Merge pull request github#5309 from github/aeisenberg/from-source-docs
Documentation: Update C/C++ Element::fromSource() docs
2 parents 648910e + 9982112 commit 312ead4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ class Element extends ElementBase {
8080
File getFile() { result = this.getLocation().getFile() }
8181

8282
/**
83-
* Holds if this element may be from source.
84-
*
85-
* Note: this predicate is provided for consistency with the libraries
86-
* for other languages, such as Java and Python. In C++, all files are
87-
* classified as source files, so this predicate is always true.
83+
* Holds if this element may be from source. This predicate holds for all
84+
* elements, except for those in the dummy file, whose name is the empty string.
85+
* The dummy file contains declarations that are built directly into the compiler.
8886
*/
8987
predicate fromSource() { this.getFile().fromSource() }
9088

0 commit comments

Comments
 (0)