mgehre added inline comments.
================
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:79
@@ +78,3 @@
+ MatchedCast->getSubExprAsWritten()->IgnoreImpCasts();
+ std::string CastText = ("dynamic_cast<" + DestTypeString + ">").str();
+ if (!isa<ParenExpr>(SubExpr)) {
----------------
aaron.ballman wrote:
> How does this handle a case like:
> ```
> SomeClass::type *derived = (SomeClass::type *)someBase;
> ```
> Will it leave the spelling as "SomeClass::type *", or replace it with the
> underlying type from the typedef? (I suspect it leaves it as-is, but it would
> be good to have tests for more complex code patterns.)
I copied the fixit part from the google c-style cast check. I will add some
more test for it.
http://reviews.llvm.org/D14096
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits