We're missing all cases where the return value is a type alias.
Unfortunately, this includes things we care about, such as
std::vector<T>::operator[] (return value is const_reference,
not const T&).
Match the canonical type instead.
Paths 
  |  Differential  D112722  
[clang-tidy]performance-unnecessary-copy-initialization: fix false negative ClosedPublic Authored by courbet on Oct 28 2021, 8:08 AM. 
Details Summary We're missing all cases where the return value is a type alias. Unfortunately, this includes things we care about, such as Match the canonical type instead. 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Oct 28 2021, 8:18 AM Closed by commit rGfc1b24d7360f: [clang-tidy]performance-unnecessary-copy-initialization: fix false negative (authored by courbet).  ·  Explain WhyOct 28 2021, 11:41 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 383038 clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
 clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||