0

I need advice about registering a new command-line option in Clang.

For example, if I want to add an simple option like -Wregister, which files I need to modify or what to do in general?

rogerw
  • 75
  • 5
  • Could you elaborate a little on this? Just to verify, is [this](https://llvm.org/docs/CommandLine.html#writing-a-custom-parser) what you're trying to do? – Jimmy Smith Oct 17 '18 at 18:56
  • 1
    Not exactly. For example, if you have a program `int main() { register int x; }` and if you use `-std=c++11` flag the compiler will output the following warning message: _'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]_. I want to register a new option `-Wxyz` which should instruct the compiler to check the presence of the _xyz_ specifier. – rogerw Oct 17 '18 at 19:20
  • Ah so you mean the register keyword, for memory allocation, as they are asking about in [this](https://stackoverflow.com/questions/10675072/is-the-register-keyword-still-used) ? – Jimmy Smith Oct 17 '18 at 20:38
  • Yes. I know what the `register` specifier does, but I need an advice how to implement option like that. – rogerw Oct 17 '18 at 23:09

0 Answers0