File tree Expand file tree Collapse file tree 7 files changed +34
-18
lines changed
templates/ext/rbs_extension Expand file tree Collapse file tree 7 files changed +34
-18
lines changed Original file line number Diff line number Diff line change 88#ifndef RBS_EXTENSION_AST_TRANSLATION_H
99#define RBS_EXTENSION_AST_TRANSLATION_H
1010
11- #pragma clang diagnostic push
12- #pragma clang diagnostic ignored "-Wc2x-extensions"
11+ #include "compat.h"
12+
13+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
1314#include "ruby.h"
1415#include "ruby/encoding.h"
15- #pragma clang diagnostic pop
16+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
1617
1718#include "rbs/ast.h"
1819#include "rbs/location.h"
Original file line number Diff line number Diff line change 88#ifndef RBS__CONSTANTS_H
99#define RBS__CONSTANTS_H
1010
11- #pragma clang diagnostic push
12- #pragma clang diagnostic ignored "-Wc2x-extensions"
11+ #include "compat.h"
12+
13+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
1314#include "ruby.h"
14- #pragma clang diagnostic pop
15+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
1516
1617extern VALUE RBS ;
1718
Original file line number Diff line number Diff line change 1+ #ifdef __clang__
2+ #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN \
3+ _Pragma("clang diagnostic push") \
4+ _Pragma("clang diagnostic ignored \"-Wc2x-extensions\"")
5+ #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END \
6+ _Pragma("clang diagnostic pop")
7+ #else
8+ #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
9+ #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
10+ #endif
Original file line number Diff line number Diff line change 11#ifndef RBS_LOCATION_H
22#define RBS_LOCATION_H
33
4- #pragma clang diagnostic push
5- #pragma clang diagnostic ignored "-Wc2x-extensions"
4+ #include "compat.h"
5+
6+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
67#include "ruby.h"
7- #pragma clang diagnostic pop
8+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
9+
810#include "rbs.h"
911
1012/**
Original file line number Diff line number Diff line change 11#include <stdbool.h>
2+ #include "compat.h"
23
3- #pragma clang diagnostic push
4- #pragma clang diagnostic ignored "-Wc2x-extensions"
4+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
55#include "ruby.h"
66#include "ruby/re.h"
77#include "ruby/encoding.h"
8- #pragma clang diagnostic pop
8+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
99
1010#include "class_constants.h"
1111#include "rbs.h"
Original file line number Diff line number Diff line change 11#ifndef RBS_EXTENSION_AST_TRANSLATION_H
22#define RBS_EXTENSION_AST_TRANSLATION_H
33
4- #pragma clang diagnostic push
5- #pragma clang diagnostic ignored "-Wc2x-extensions"
4+ #include "compat.h"
5+
6+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
67#include "ruby.h"
78#include "ruby/encoding.h"
8- #pragma clang diagnostic pop
9+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
910
1011#include "rbs/ast.h"
1112#include "rbs/location.h"
Original file line number Diff line number Diff line change 11#ifndef RBS__CONSTANTS_H
22#define RBS__CONSTANTS_H
33
4- #pragma clang diagnostic push
5- #pragma clang diagnostic ignored "-Wc2x-extensions"
4+ #include "compat.h"
5+
6+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN
67#include "ruby.h"
7- #pragma clang diagnostic pop
8+ SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END
89
910extern VALUE RBS;
1011
You can’t perform that action at this time.
0 commit comments