[all-commits] [llvm/llvm-project] 698568: [clang CodeGen] Don't crash on large atomic functi...
Eli Friedman via All-commits
all-commits at lists.llvm.org
Mon May 17 13:19:05 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 698568b74c93ab6d9374adc8bdc6e60fbcf41ff1
https://github.com/llvm/llvm-project/commit/698568b74c93ab6d9374adc8bdc6e60fbcf41ff1
Author: Eli Friedman <efriedma at quicinc.com>
Date: 2021-05-17 (Mon, 17 May 2021)
Changed paths:
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/CodeGen/CGDecl.cpp
M clang/test/CodeGen/big-atomic-ops.c
M clang/test/CodeGenCXX/atomic.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list