[all-commits] [llvm/llvm-project] d75a6e: [CUDA][HIP] Fix empty ctor/dtor check for union
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Mon May 4 18:52:45 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d75a6e93ae99bfcd67219454307da56ebd155d45
https://github.com/llvm/llvm-project/commit/d75a6e93ae99bfcd67219454307da56ebd155d45
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2020-05-04 (Mon, 04 May 2020)
Changed paths:
M clang/lib/Sema/SemaCUDA.cpp
A clang/test/SemaCUDA/union-init.cu
Log Message:
-----------
[CUDA][HIP] Fix empty ctor/dtor check for union
union ctor does not call ctors of its data members. union dtor does not call dtors of its data members.
Also union does not have base class.
Currently when clang checks whether union has an empty ctor/dtor, it checks the ctors/dtors of its
data members. This causes incorrectly diagnose device side global variables and shared variables as
having non-empty ctors/dtors.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D79367
More information about the All-commits
mailing list