Dimitry Andric c3ca3130e2 Merge commit 30588a739 from llvm git (by Erich Keane):
Make target features check work with ctor and dtor-

  The problem was reported in PR45468, applying target features to an
  always_inline constructor/destructor runs afoul of GlobalDecl
  construction assert when checking for target-feature compatibility.

  The core problem is fixed by using the version of the check that
  takes a FunctionDecl rather than the GlobalDecl. However, while
  writing the test, I discovered that source locations weren't properly
  set for this check on ctors/dtors. This patch also fixes constructors
  and CALLED destructors.

  Unfortunately, it doesn't seem too possible to get a meaningful
  source location for a 'cleanup' destructor, so those are still
  'frontend' level errors unfortunately. A fixme was added to the test
  to cover that situation.

This should fix 'Assertion failed: (!isa<CXXConstructorDecl>(D) && "Use
other ctor with ctor decls!"), function Init, file
/usr/src/contrib/llvm-project/clang/include/clang/AST/GlobalDecl.h, line
45' when compiling the security/botan2 port.

PR:		245550
MFC after:	6 weeks
X-MFC-With:	358851
2020-04-12 16:06:59 +00:00
..
2020-04-01 15:25:16 +00:00
2020-02-11 07:02:48 +00:00
2020-03-29 02:40:03 +00:00
2020-03-02 08:44:58 +00:00
2019-12-21 21:05:53 +00:00
2020-01-25 21:16:45 +00:00
2020-02-19 17:09:08 +00:00
2020-04-06 23:11:43 +00:00
2019-12-21 21:02:50 +00:00
2020-03-22 01:27:38 +00:00