HomePhabricator

[clang CodeGen] Don't crash on large atomic function parameter.

Authored by efriedma on May 6 2021, 12:27 PM.

Description

[clang CodeGen] Don't crash on large atomic function parameter.

I wouldn't recommend writing code like the testcase; a function
parameter isn't atomic, so using an atomic type doesn't really make
sense. But it's valid, so clang shouldn't crash on it.

The code was assuming hasAggregateEvaluationKind(Ty) implies Ty is a
RecordType, which isn't true. Just use isRecordType() instead.

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