Logs an error if both a header and its inline variant are included.
(filename, include_state, error)
| 2805 | |
| 2806 | |
| 2807 | def CheckInlineHeader(filename, include_state, error): |
| 2808 | """Logs an error if both a header and its inline variant are included.""" |
| 2809 | |
| 2810 | all_headers = dict(item for sublist in include_state.include_list |
| 2811 | for item in sublist) |
| 2812 | bad_headers = set('%s.h' % name[:-6] for name in all_headers.keys() |
| 2813 | if name.endswith('-inl.h')) |
| 2814 | bad_headers &= set(all_headers.keys()) |
| 2815 | |
| 2816 | for name in bad_headers: |
| 2817 | err = '%s includes both %s and %s-inl.h' % (filename, name, name) |
| 2818 | linenum = all_headers[name] |
| 2819 | error(filename, linenum, 'build/include_inline', 5, err) |
| 2820 | |
| 2821 | |
| 2822 | def CheckForNewlineAtEOF(filename, lines, error): |
no test coverage detected
searching dependent graphs…