HomePhabricator

[clang] disable implicit moves when not in CPlusPLus

Authored by mizvekov on Sep 11 2021, 4:11 PM.

Description

[clang] disable implicit moves when not in CPlusPLus

See PR51842.

This fixes an assert firing in the static analyzer, triggered by implicit moves
in blocks in C mode:

This also simplifies the AST a little bit when compiling non C++ code,
as the xvalue implicit casts are not inserted.

We keep and test that the nrvo flag is still being set on the VarDecls,
as that is still a bit beneficial while not really making anything
more complicated.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D109654

Details

Committed
mizvekovSep 14 2021, 2:29 AM
Reviewer
NoQ
Differential Revision
D109654: [clang] disable implicit moves when not in CPlusPLus
Parents
rGf28740541942: AArch64: fix indentation of ProcAppleA14. NFC.
Branches
Unknown
Tags
Unknown