mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
68 lines
903 B
C++
68 lines
903 B
C++
/*
|
|
* This sentence contains a semicolon;
|
|
* however, this doesn't make it code.
|
|
*/
|
|
|
|
// This sentence contains a semicolon;
|
|
// however, this doesn't make it code.
|
|
|
|
/* Mention a ';' */
|
|
|
|
/* Mention a '{' */
|
|
|
|
/* JSON example: {"foo":"bar"} */
|
|
|
|
/* JSON example in backticks: `{"foo":"bar"}` */
|
|
|
|
/* JSON example in quotes: '{"foo":"bar"}' */
|
|
|
|
/*
|
|
* Code example: `return 0;`.
|
|
*/
|
|
|
|
// Code example:
|
|
//
|
|
// return 0;
|
|
|
|
// Code example:
|
|
//
|
|
// ```
|
|
// return 0;
|
|
// ```
|
|
|
|
// { 1, 2, 3, 4 }
|
|
|
|
// Example: { 1, 2, 3, 4 }
|
|
|
|
// int myFunction() { return myValue; }
|
|
|
|
// int myFunction() const { return myValue; }
|
|
|
|
// int myFunction() const noexcept { return myValue; }
|
|
|
|
// #define MYMACRO
|
|
|
|
// #include "include.h"
|
|
|
|
/*
|
|
#ifdef
|
|
void myFunction();
|
|
#endif
|
|
*/
|
|
|
|
// define some constants
|
|
|
|
// don't #include anything here
|
|
|
|
// #hashtag
|
|
|
|
// #if(defined(MYMACRO))
|
|
|
|
// #iffy
|
|
|
|
// #pragma once
|
|
|
|
// # pragma once
|
|
|
|
/*#error"myerror"*/
|