Fix #356 Don't complain about #pragma once in C++ headers

This commit is contained in:
w0rp
2017-04-30 00:30:44 +01:00
parent 2c7d14809d
commit a6cadaabef
2 changed files with 24 additions and 0 deletions

View File

@@ -77,3 +77,20 @@ Execute(GCC versions should be parsed correctly):
\ 'This is free software; see the source for copying conditions. There is NO',
\ 'warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.',
\])
Execute(The GCC handler shouldn't complain about #pragma once for headers):
silent file! test.h
AssertEqual
\ [],
\ ale#handlers#gcc#HandleGCCFormat(347, [
\ '<stdin>:1:1: warning: #pragma once in main file [enabled by default]',
\ ])
silent file! test.hpp
AssertEqual
\ [],
\ ale#handlers#gcc#HandleGCCFormat(347, [
\ '<stdin>:1:1: warning: #pragma once in main file [enabled by default]',
\ ])