diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-08-17 17:26:33 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-08-17 17:26:33 +0000 |
commit | ae3d7833d0fdf5be7149a1708302dc8f4c0ef99b (patch) | |
tree | f32838dda7ea15aa3be3bd2e328f07bf6d62c525 /test/CodeGenCXX | |
parent | f1c97542ff84f0a49cdc2af11cc30d499cd9adba (diff) |
Merging r310776:
------------------------------------------------------------------------
r310776 | rsmith | 2017-08-11 18:46:03 -0700 (Fri, 11 Aug 2017) | 8 lines
PR34163: Don't cache an incorrect key function for a class if queried between
the class becoming complete and its inline methods being parsed.
This replaces the hack of using the "late parsed template" flag to track member
functions with bodies we've not parsed yet; instead we now use the "will have
body" flag, which carries the desired implication that the function declaration
*is* a definition, and that we've just not parsed its body yet.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@311105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/pr34163.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/pr34163.cpp b/test/CodeGenCXX/pr34163.cpp new file mode 100644 index 0000000000..a200a0f509 --- /dev/null +++ b/test/CodeGenCXX/pr34163.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-linux-gnu -o - -x c++ %s | FileCheck %s + +void f(struct X *) {} + +// CHECK: @_ZTV1X = +struct X { + void a() { delete this; } + virtual ~X() {} + virtual void key_function(); +}; + +// CHECK: define {{.*}} @_ZN1X12key_functionEv( +void X::key_function() {} |