Originally reported on Google Code with ID 82
There are at least three places where a list of extensions for source files is made
or used in the code. At least one of them (the python one) doesn't match the others.
Ideally, we'd find a DRY solution allowing a single list of these extensions to be
used in all locations. (They can be usually found by grepping for "\.cpp", since comments
typically use ".cc" so ".cpp" creates fewer false positives.)
iwyu_path_util.cc:
A. around line 45
B. around line 96
fix_includes.py
C. line 155
Kinds of lists involved:
- Source (non-header) file extensions, at A, B, and C
- Header file extensions - b, but assumed to be the complement of the previous at A
and C
Additionally, the lists of prefixes/suffixes and of source->header conversions found
near B may benefit from being stored as data rather than embedded in code. (an array
of POD structs that is statically initialized?)
Reported by ryan.pavlik on 2012-11-20 19:35:45
该提问来源于开源项目:include-what-you-use/include-what-you-use