mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Test for x-macro FP observed in the wild
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
| complexcondition2.h:0:0:0:0 | complexcondition2.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
| complexcondition.h:0:0:0:0 | complexcondition.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
| fundecl.h:0:0:0:0 | fundecl.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
| items3.h:0:0:0:0 | items3.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
| multipleguards.h:0:0:0:0 | multipleguards.h | This header file should contain a header guard to prevent multiple inclusion ($@ matching $@ occurs before the end of the file). | multipleguards.h:7:1:7:6 | #endif | #endif | multipleguards.h:2:1:2:24 | #ifndef MULTIPLEGUARDS_H | #ifndef MULTIPLEGUARDS_H |
|
||||
| namespace1.h:0:0:0:0 | namespace1.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
| namespace2.h:0:0:0:0 | namespace2.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
|
||||
|
||||
@@ -53,3 +53,8 @@ enum Items {
|
||||
#define XMACRO2(id,desc) void use_##();
|
||||
#include "items2.h"
|
||||
#undef XMACRO2
|
||||
|
||||
|
||||
#define XMACRO3(id,desc) static const char * id##_item = "The " desc " item";
|
||||
#include "items3.h"
|
||||
// No #undef of XMACRO3. That's handled in items3.h.
|
||||
|
||||
@@ -32,3 +32,7 @@ enum Items {
|
||||
#define XMACRO2(id,desc) void use_##();
|
||||
#include "items2.h"
|
||||
#undef XMACRO2
|
||||
|
||||
#define XMACRO3(id,desc) static const char * id##_name = desc;
|
||||
#include "items3.h"
|
||||
// No #undef of XMACRO3. That's handled in items3.h.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
XMACRO3(shield, "Wooden Shield")
|
||||
XMACRO3(boots, "Leather Boots")
|
||||
XMACRO3(helmet, "Helmet")
|
||||
|
||||
#undef XMACRO3
|
||||
Reference in New Issue
Block a user