Greetings!
I am trying to understand the tidy code flow.
For example A.c file includes various Header files and that Header may be including other heaers…
Can you please elaborate how tidy preprocess each header and source code including nested includes?
Note: I am passing compiler arguments via “$ clang-tidy A.c – <compiler_args>”.
Thanks,
[Please reply *only* to the list and do not include my email directly
in the To: or Cc: of your reply; otherwise I will not see your reply.
Thanks.]
In article <BY1PR0601MB1158B0D0FE75117ACB6AEB758FB00@BY1PR0601MB1158.namprd06.prod.outlook.com>,
"Oza, Hiral via cfe-dev" <cfe-dev@lists.llvm.org> writes:
I am trying to understand the tidy code flow.
For example A.c file includes various Header files and that Header may be
including other heaers...
Can you please elaborate how tidy preprocess each header and source code
including nested includes?
Note: I am passing compiler arguments via "$ clang-tidy A.c --
<compiler_args>".
Clang-tidy sees the abstract syntax tree (AST) created by the parser.
The AST is matched by the various checks and then changes are applied
to a list of "fix its". The "fix its" are then applied to source
files. By the time the AST is constructed, all header files have been
transitively included by the preprocessing steps. Everything is
annotated in the AST with it's location in the source files, so the
fixits can be filtered by command-line arguments that say whether or
not a header file (based on a path regex) should be modified by
clang-tidy.