hokein marked 3 inline comments as done.
hokein added inline comments.

================
Comment at: clang-move/ClangMove.cpp:417
+      if (const auto *FTD = CMD->getDescribedFunctionTemplate())
+        UnremovedDeclsInOldHeader.erase(FTD);
+      else
----------------
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);
```  


https://reviews.llvm.org/D26423



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to