baloghadamsoftware marked 2 inline comments as done.
baloghadamsoftware added inline comments.
================
Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:65-66
has(varDecl(hasLocalStorage(),
- hasType(matchers::isExpensiveToCopy()),
+ hasType(hasCanonicalType(
+ allOf(matchers::isExpensiveToCopy(),
+ unless(hasDeclaration(namedDecl(
----------------
JonasToth wrote:
> lebedev.ri wrote:
> > Does it matter whether we are calling `matchers::isExpensiveToCopy()` on
> > the type, or on the canonical type?
> the canonical type does resolve all typedefs, which is what is desirable in
> this case.
The real question is whether we want to match the canonical type to the list of
allowed type names. I am not sure.
https://reviews.llvm.org/D52727
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits