Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f928c2

Browse files
committed
CPP: Examples Element.qll.
1 parent 8ae0178 commit 1f928c2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,12 @@ private predicate isFromUninstantiatedTemplateRec(Element e, Element template) {
270270
}
271271

272272
/**
273-
* A C++11 `static_assert` or C11 `_Static_assert` construct.
273+
* A C++11 `static_assert` or C11 `_Static_assert` construct. For example each
274+
* line in the following example contains a static assert:
275+
* ```
276+
* static_assert(sizeof(MyStruct) <= 4096);
277+
* static_assert(sizeof(MyStruct) <= 4096, "MyStruct is too big!");
278+
* ```
274279
*/
275280
class StaticAssert extends Locatable, @static_assert {
276281
override string toString() { result = "static_assert(..., \"" + getMessage() + "\")" }

0 commit comments

Comments
 (0)