@@ -2,7 +2,14 @@ import semmle.code.cpp.Preprocessor
22
33/**
44 * A C/C++ `#include`, `#include_next`, or `#import` preprocessor
5- * directive.
5+ * directive. The following example contains four different `Include`
6+ * directives:
7+ * ```
8+ * #include "header.h"
9+ * #include <string>
10+ * #include_next <header2.h>
11+ * #import <header3.h>
12+ * ```
613 */
714class Include extends PreprocessorDirective , @ppd_include {
815 override string toString ( ) { result = "#include " + this .getIncludeText ( ) }
@@ -37,7 +44,10 @@ class Include extends PreprocessorDirective, @ppd_include {
3744
3845/**
3946 * A `#include_next` preprocessor directive (a non-standard extension to
40- * C/C++).
47+ * C/C++). For example the following code contains one `IncludeNext` directive:
48+ * ```
49+ * #include_next <header2.h>
50+ * ```
4151 */
4252class IncludeNext extends Include , @ppd_include_next {
4353 override string toString ( ) {
@@ -47,7 +57,11 @@ class IncludeNext extends Include, @ppd_include_next {
4757
4858/**
4959 * A `#import` preprocessor directive (used heavily in Objective C, and
50- * supported by GCC as an extension in C).
60+ * supported by GCC as an extension in C). For example the following code
61+ * contains one `Import` directive:
62+ * ```
63+ * #import <header3.h>
64+ * ```
5165 */
5266class Import extends Include , @ppd_objc_import {
5367 override string toString ( ) {
0 commit comments