[PATCH] D101776: Work around an unfortunate macro in the Windows SDK
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 4 05:13:54 PDT 2021
aaron.ballman added a comment.
> Once accepted I'll need someone to commit the change on my behalf.
Thanks for mentioning this up front! What email address and name would you like to have used for attribution on the commit?
================
Comment at: clang/include/clang/Analysis/CFG.h:1392-1393
- template <typename CALLBACK>
- void VisitBlockStmts(CALLBACK& O) const {
+ template <typename CALLBACKFN>
+ void VisitBlockStmts(CALLBACKFN& O) const {
for (const_iterator I = begin(), E = end(); I != E; ++I)
----------------
Good catch on fixing this! I think a better fix would be to change the name `CALLBACK` to `Callback` to more closely match our usual naming conventions (https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly). Keeping it in all caps makes the identifier look like a macro when it isn't one. You might as well address the clang-format issue while you're touching the code, as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101776/new/
https://reviews.llvm.org/D101776
More information about the cfe-commits
mailing list