mirror of
https://github.com/github/codeql.git
synced 2026-06-13 00:41:07 +02:00
C++
This commit is contained in:
@@ -34,21 +34,21 @@
|
||||
|
||||
// Example: { 1, 2, 3, 4 }
|
||||
|
||||
// int myFunction() { return myValue; }
|
||||
// int myFunction() { return myValue; } // $ Alert
|
||||
|
||||
// int myFunction() const { return myValue; }
|
||||
// int myFunction() const { return myValue; } // $ Alert
|
||||
|
||||
// int myFunction() const noexcept { return myValue; }
|
||||
// int myFunction() const noexcept { return myValue; } // $ Alert
|
||||
|
||||
// #define MYMACRO
|
||||
// #define MYMACRO // $ Alert
|
||||
|
||||
// #include "include.h"
|
||||
// #include "include.h" // $ Alert
|
||||
|
||||
/*
|
||||
#ifdef
|
||||
void myFunction();
|
||||
#endif
|
||||
*/
|
||||
*/ // $ Alert
|
||||
|
||||
// define some constants
|
||||
|
||||
@@ -56,15 +56,15 @@ void myFunction();
|
||||
|
||||
// #hashtag
|
||||
|
||||
// #if(defined(MYMACRO))
|
||||
// #if(defined(MYMACRO)) // $ Alert
|
||||
|
||||
// #iffy
|
||||
|
||||
// #pragma once
|
||||
// #pragma once // $ Alert
|
||||
|
||||
// # pragma once
|
||||
// # pragma once // $ Alert
|
||||
|
||||
/*#error"myerror"*/
|
||||
/*#error"myerror"*/ // $ Alert
|
||||
|
||||
#ifdef MYMACRO
|
||||
|
||||
@@ -92,7 +92,7 @@ void myFunction();
|
||||
#ifdef MYMACRO
|
||||
// ...
|
||||
#endif // #ifdef MYMACRO
|
||||
*/
|
||||
*/ // $ Alert
|
||||
|
||||
|
||||
#ifdef MYMACRO1
|
||||
@@ -104,7 +104,7 @@ void myFunction();
|
||||
#endif // #ifdef MYMACRO2
|
||||
#endif // #ifdef MYMACRO1
|
||||
|
||||
#include "config.h" // #include "config2.h"
|
||||
#include "config.h" // #include "config2.h" // $ Alert
|
||||
|
||||
#ifdef MYMACRO
|
||||
|
||||
@@ -112,10 +112,10 @@ void myFunction();
|
||||
|
||||
#endif /* #ifdef MYMACRO */
|
||||
|
||||
#error "error" /* #ifdef MYMACRO */
|
||||
#error "error" /* #ifdef MYMACRO */ // $ Alert
|
||||
|
||||
// commented_out_code();
|
||||
// commented_out_code(); // $ Alert
|
||||
|
||||
#if 0
|
||||
// commented_out_code();
|
||||
// commented_out_code(); // $ Alert
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user