[PATCH] D26423: [clang-move] Support template class.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 12:07:10 PST 2016
ioeric added inline comments.
================
Comment at: clang-move/ClangMove.cpp:417
+ if (const auto *FTD = CMD->getDescribedFunctionTemplate())
+ UnremovedDeclsInOldHeader.erase(FTD);
+ else
----------------
hokein wrote:
> ioeric wrote:
> > `erase(FTD ? FTD : CMD)`
> We can't write the code like this way since the ternary operator (`condition ? E1:E2`) requires E1 and E2 has same type or they can convert to each other. In our case, the pointer types of `FTD` and `CMD` are different, and they can't convert to each other.
>
> We could pass the compilation by writing the code like following way, but I'd keep the current way.
>
> ```
> erase(FTD ? static_cast<NamedDecl*>(FTD) : static_cast<NamedDecl*>CMD);
> ```
nvm. you can keep it as it is.
https://reviews.llvm.org/D26423
More information about the cfe-commits
mailing list