@@ -41,7 +41,7 @@ class UnaryPlusExpr extends UnaryArithmeticOperation, @unaryplusexpr {
4141 * functions.
4242 * ```
4343 * _Complex double a = ( 1.0, 2.0 );
44- * b = ~ a; // ( 1,0, - 2.0 )
44+ * _Complex double b = ~ a; // ( 1,0, - 2.0 )
4545 * ```
4646 */
4747class ConjugationExpr extends UnaryArithmeticOperation , @conjugation {
@@ -273,7 +273,13 @@ class RemExpr extends BinaryArithmeticOperation, @remexpr {
273273}
274274
275275/**
276- * A C/C++ multiply expression with an imaginary number.
276+ * A C/C++ multiply expression with an imaginary number. This is specific to
277+ * C99 and later.
278+ * ```
279+ * double z;
280+ * _Imaginary double x, y;
281+ * z = x * y;
282+ * ```
277283 */
278284class ImaginaryMulExpr extends BinaryArithmeticOperation , @jmulexpr {
279285 override string getOperator ( ) { result = "*" }
@@ -286,7 +292,13 @@ class ImaginaryMulExpr extends BinaryArithmeticOperation, @jmulexpr {
286292}
287293
288294/**
289- * A C/C++ divide expression with an imaginary number.
295+ * A C/C++ divide expression with an imaginary number. This is specific to
296+ * C99 and later.
297+ * ```
298+ * double z;
299+ * _Imaginary double y;
300+ * z = z / y;
301+ * ```
290302 */
291303class ImaginaryDivExpr extends BinaryArithmeticOperation , @jdivexpr {
292304 override string getOperator ( ) { result = "/" }
@@ -299,7 +311,14 @@ class ImaginaryDivExpr extends BinaryArithmeticOperation, @jdivexpr {
299311}
300312
301313/**
302- * A C/C++ add expression with a real term and an imaginary term.
314+ * A C/C++ add expression with a real term and an imaginary term. This is
315+ * specific to C99 and later.
316+ * ```
317+ * double z;
318+ * _Imaginary double x;
319+ * _Complex double w;
320+ * w = z + x;
321+ * ```
303322 */
304323class RealImaginaryAddExpr extends BinaryArithmeticOperation , @fjaddexpr {
305324 override string getOperator ( ) { result = "+" }
@@ -312,7 +331,14 @@ class RealImaginaryAddExpr extends BinaryArithmeticOperation, @fjaddexpr {
312331}
313332
314333/**
315- * A C/C++ add expression with an imaginary term and a real term.
334+ * A C/C++ add expression with an imaginary term and a real term. This is
335+ * specific to C99 and later.
336+ * ```
337+ * double z;
338+ * _Imaginary double x;
339+ * _Complex double w;
340+ * w = x + z;
341+ * ```
316342 */
317343class ImaginaryRealAddExpr extends BinaryArithmeticOperation , @jfaddexpr {
318344 override string getOperator ( ) { result = "+" }
@@ -325,7 +351,14 @@ class ImaginaryRealAddExpr extends BinaryArithmeticOperation, @jfaddexpr {
325351}
326352
327353/**
328- * A C/C++ subtract expression with a real term and an imaginary term.
354+ * A C/C++ subtract expression with a real term and an imaginary term. This is
355+ * specific to C99 and later.
356+ * ```
357+ * double z;
358+ * _Imaginary double x;
359+ * _Complex double w;
360+ * w = z - x;
361+ * ```
329362 */
330363class RealImaginarySubExpr extends BinaryArithmeticOperation , @fjsubexpr {
331364 override string getOperator ( ) { result = "-" }
@@ -338,7 +371,14 @@ class RealImaginarySubExpr extends BinaryArithmeticOperation, @fjsubexpr {
338371}
339372
340373/**
341- * A C/C++ subtract expression with an imaginary term and a real term.
374+ * A C/C++ subtract expression with an imaginary term and a real term. This is
375+ * specific to C99 and later.
376+ * ```
377+ * double z;
378+ * _Imaginary double x;
379+ * _Complex double w;
380+ * w = x - z;
381+ * ```
342382 */
343383class ImaginaryRealSubExpr extends BinaryArithmeticOperation , @jfsubexpr {
344384 override string getOperator ( ) { result = "-" }
0 commit comments