Serge Pavlov
e6e534ca22
Function definition may have uninstantiated body
...
Current implementation of `FunctionDecl::isDefined` does not take into
account redeclarations that do not have bodies, but the bodies can be
instantiated from corresponding templated definition. This behavior does
not allow to detect function redefinition in the cases where friend
functions is defined in class templates. For instance, the code:
```
template<typename T> struct X { friend void f() {} };
X<int> xi;
void f() {}
```
compiles successfully but must fail due to redefinition of `f`. The
declaration of the friend `f` is created when the containing template
`X` is instantiated, but it does not have a body as per 14.5.4p4
because `f` is not odr-used.
With this change the function `Sema::CheckForFunctionRedefinition`
considers functions with uninstantiated bodies as definitions.
Differential Revision: https://reviews.llvm.org/D30170
llvm-svn: 326419
2018-03-01 07:04:11 +00:00
..
2017-10-26 13:18:14 +00:00
2018-02-16 12:06:32 +00:00
2017-10-27 22:48:41 +00:00
2017-12-07 09:23:50 +00:00
2016-12-21 01:57:02 +00:00
2017-10-03 20:36:00 +00:00
2017-03-30 21:48:55 +00:00
2017-03-21 22:06:18 +00:00
2017-07-05 04:58:24 +00:00
2017-04-13 21:51:04 +00:00
2017-02-28 14:53:50 +00:00
2018-01-17 19:29:39 +00:00
2017-10-21 20:28:58 +00:00
2017-07-05 17:08:56 +00:00
2017-11-26 20:01:12 +00:00
2017-11-26 20:01:12 +00:00
2017-12-09 01:32:07 +00:00
2017-04-27 12:01:00 +00:00
2017-03-10 15:04:58 +00:00
2017-11-26 20:01:12 +00:00
2017-09-14 17:33:08 +00:00
2018-02-16 17:31:59 +00:00
2017-11-26 20:01:12 +00:00
2017-07-15 11:06:46 +00:00
2017-02-04 01:28:01 +00:00
2018-01-13 15:24:16 +00:00
2017-11-26 20:01:12 +00:00
2016-11-30 00:13:55 +00:00
2016-12-19 23:59:34 +00:00
2017-03-10 15:04:58 +00:00
2017-06-14 03:24:55 +00:00
2018-01-07 22:03:44 +00:00
2018-01-03 08:45:19 +00:00
2017-08-08 23:18:05 +00:00
2017-08-08 23:18:05 +00:00
2017-12-21 21:42:42 +00:00
2018-02-23 23:59:20 +00:00
2016-12-15 02:35:39 +00:00
2017-12-14 15:16:18 +00:00
2017-10-24 02:17:07 +00:00
2017-01-20 01:19:46 +00:00
2017-10-20 22:56:25 +00:00
2017-08-08 23:17:51 +00:00
2017-01-20 00:45:35 +00:00
2016-12-03 01:14:32 +00:00
2017-05-16 10:23:58 +00:00
2017-01-04 23:14:16 +00:00
2016-12-20 02:43:58 +00:00
2016-12-21 18:33:17 +00:00
2017-12-31 18:27:29 +00:00
2017-05-31 19:36:59 +00:00
2017-05-22 22:33:17 +00:00
2017-05-24 14:34:19 +00:00
2017-05-31 19:36:59 +00:00
2018-02-16 14:11:27 +00:00
2017-01-30 10:44:11 +00:00
2017-10-14 00:56:24 +00:00
2017-06-04 12:53:12 +00:00
2017-03-10 15:04:58 +00:00
2017-03-24 01:14:25 +00:00
2017-03-24 01:14:25 +00:00
2017-03-24 01:14:25 +00:00
2017-12-11 18:29:54 +00:00
2017-12-31 18:27:29 +00:00
2017-06-20 17:38:07 +00:00
2017-09-17 15:37:51 +00:00
2017-08-15 19:11:21 +00:00
2018-01-02 23:52:42 +00:00
2017-08-22 17:55:19 +00:00
2017-02-09 22:14:25 +00:00
2017-05-10 02:30:28 +00:00
2018-01-04 01:24:17 +00:00
2017-02-16 04:12:21 +00:00
2017-11-01 01:37:11 +00:00
2017-06-12 16:11:06 +00:00
2017-09-21 17:58:27 +00:00
2017-08-09 20:12:53 +00:00
2017-05-02 20:56:34 +00:00
2017-10-30 18:06:18 +00:00
2016-12-30 04:51:10 +00:00
2017-12-05 23:54:25 +00:00
2017-08-19 03:43:07 +00:00
2017-12-31 18:27:29 +00:00
2017-12-01 02:13:10 +00:00
2017-11-11 00:54:25 +00:00
2016-11-27 16:26:14 +00:00
2017-01-23 23:14:23 +00:00
2017-02-15 04:18:23 +00:00
2017-08-28 00:31:35 +00:00
2017-10-18 02:19:24 +00:00
2017-03-21 22:06:18 +00:00
2017-12-21 22:26:47 +00:00
2017-12-07 07:03:15 +00:00
2017-01-05 01:08:22 +00:00
2017-05-25 22:47:05 +00:00
2017-02-24 23:23:53 +00:00
2017-11-15 17:47:58 +00:00
2017-11-01 23:38:37 +00:00
2017-01-17 19:35:54 +00:00
2017-08-31 06:18:26 +00:00
2017-01-09 22:43:16 +00:00
2017-01-28 04:16:32 +00:00
2017-11-26 20:01:12 +00:00
2017-07-07 22:04:29 +00:00
2017-11-26 20:01:12 +00:00
2017-05-09 04:06:24 +00:00
2017-03-21 02:23:00 +00:00
2017-12-11 19:44:28 +00:00
2017-09-15 19:51:42 +00:00
2018-02-09 09:30:42 +00:00
2017-06-26 23:19:32 +00:00
2016-12-03 01:14:32 +00:00
2018-01-03 02:34:35 +00:00
2017-10-23 22:01:41 +00:00
2017-05-15 01:49:19 +00:00
2017-02-13 18:57:06 +00:00
2018-03-01 07:04:11 +00:00
2017-02-24 13:15:08 +00:00
2017-11-30 16:37:02 +00:00
2017-02-24 22:22:05 +00:00
2017-08-09 14:56:48 +00:00
2017-08-30 20:25:22 +00:00
2017-02-23 21:43:43 +00:00
2017-02-06 19:32:38 +00:00
2018-02-07 22:25:16 +00:00
2017-08-13 22:26:53 +00:00
2017-08-08 23:18:05 +00:00
2017-11-26 20:01:12 +00:00
2017-05-10 21:32:16 +00:00
2017-06-26 18:46:12 +00:00
2018-02-06 02:58:21 +00:00
2018-02-14 13:27:48 +00:00
2017-01-08 04:01:15 +00:00
2017-02-23 02:09:03 +00:00
2017-10-10 21:07:44 +00:00
2017-05-20 19:58:04 +00:00
2017-02-23 02:09:03 +00:00
2017-08-29 03:04:13 +00:00
2017-08-28 00:28:14 +00:00
2016-12-09 18:49:13 +00:00
2017-09-26 17:44:10 +00:00
2017-11-15 17:11:53 +00:00
2017-04-21 20:12:26 +00:00
2017-08-09 02:03:59 +00:00
2017-11-01 03:57:27 +00:00
2017-11-21 09:42:42 +00:00
2017-09-20 22:28:24 +00:00
2017-09-15 16:03:35 +00:00
2017-09-15 16:03:35 +00:00
2017-10-02 16:49:32 +00:00
2017-09-29 21:06:00 +00:00
2018-02-22 07:49:13 +00:00
2017-06-11 20:33:00 +00:00
2017-12-09 12:09:54 +00:00
2017-01-24 23:18:28 +00:00
2017-12-09 12:09:54 +00:00
2017-12-14 22:32:24 +00:00
2017-12-14 22:32:24 +00:00
2017-02-24 22:22:05 +00:00
2017-09-28 20:47:10 +00:00
2017-05-26 02:16:00 +00:00
2017-05-19 20:20:13 +00:00
2017-09-20 18:06:44 +00:00
2017-11-30 08:18:21 +00:00
2017-01-09 08:01:21 +00:00
2017-10-05 19:35:51 +00:00
2017-03-22 01:49:19 +00:00
2016-12-09 19:47:58 +00:00
2017-02-24 23:23:53 +00:00
2017-01-06 22:52:53 +00:00
2017-06-26 18:46:12 +00:00
2017-06-09 22:25:28 +00:00
2017-02-13 18:57:06 +00:00
2017-03-10 15:04:58 +00:00
2017-04-13 21:49:46 +00:00
2016-12-09 18:49:13 +00:00
2017-12-21 21:47:22 +00:00
2018-01-07 22:25:55 +00:00
2017-10-06 23:09:55 +00:00
2018-01-17 18:53:51 +00:00
2017-09-14 23:38:42 +00:00
2017-03-27 19:45:24 +00:00
2016-12-08 14:46:05 +00:00
2016-12-22 04:26:57 +00:00
2017-10-24 13:51:07 +00:00
2017-03-23 18:51:54 +00:00
2017-04-12 15:56:02 +00:00
2017-03-24 01:14:25 +00:00
2017-01-04 23:14:16 +00:00
2018-02-02 20:30:39 +00:00
2018-02-23 19:30:48 +00:00
2017-09-25 17:36:54 +00:00
2017-04-26 23:15:10 +00:00
2017-05-10 21:32:16 +00:00
2017-07-19 17:17:50 +00:00
2017-09-22 22:21:44 +00:00
2017-12-14 23:37:08 +00:00
2017-05-25 22:47:05 +00:00
2017-12-09 12:09:54 +00:00
2017-11-01 04:52:12 +00:00
2016-12-09 19:47:58 +00:00
2017-11-01 23:38:37 +00:00
2017-09-22 04:25:05 +00:00
2017-05-12 19:11:06 +00:00
2017-05-25 22:47:05 +00:00
2017-02-24 22:22:05 +00:00
2017-08-08 23:18:05 +00:00
2017-03-14 18:01:02 +00:00
2017-02-24 22:22:05 +00:00
2017-08-13 22:26:53 +00:00
2017-07-03 17:59:22 +00:00
2017-11-26 20:01:12 +00:00
2017-11-20 17:48:54 +00:00
2017-12-11 18:58:18 +00:00
2017-10-24 02:17:07 +00:00
2017-03-01 03:07:55 +00:00
2017-07-04 00:52:24 +00:00
2016-12-06 00:27:21 +00:00
2018-01-08 21:46:42 +00:00
2017-12-21 21:42:42 +00:00
2017-01-10 14:41:13 +00:00
2017-07-31 15:21:26 +00:00
2017-09-21 20:14:08 +00:00
2018-01-11 22:13:57 +00:00
2017-12-14 22:24:45 +00:00
2018-02-20 02:32:30 +00:00
2017-09-20 07:22:00 +00:00
2017-11-26 20:01:12 +00:00
2017-05-09 11:25:41 +00:00
2017-12-11 18:00:36 +00:00
2017-11-01 04:52:12 +00:00
2017-04-19 21:24:55 +00:00
2017-03-27 16:29:41 +00:00
2017-10-19 19:07:13 +00:00
2016-12-06 21:44:41 +00:00
2017-10-26 13:18:14 +00:00
2017-02-24 22:22:05 +00:00