https://bugs.llvm.org/show_bug.cgi?id=48464
Bug ID: 48464
Summary: performance-no-automatic-move should accept a list of
classes to be ignored
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Tooling
Assignee: unassignedclangb...@nondot.org
Reporter: aa...@kde.org
CC: llvm-bugs@lists.llvm.org
I see the point for some classes, but take for example Qt classes like QString
that is refcounted, returning it by copy is as good as returning it by move
because all that happens is that the internal refcounter is updated.
But if if you have a long function with
const QString foo = ...
// lots of code
return foo;
it's worth foo being const since it won't be slower than if it wasn't and
prevents you making the mistake of changing foo.
That's why i think it'd be good if there was a way to tell
performance-no-automatic-move to ignore some classes from the check.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs