Aleksandr Platonov
8bd00557e3
[clang][parser] Allow GNU attributes before namespace identifier
...
GCC supports:
- `namespace <gnu attributes> identifier`
- `namespace identifier <gnu attributes>`
But clang supports only `namespace identifier <gnu attributes>` and diagnostics for `namespace <gnu attributes> identifier` case looks unclear:
Code:
```
namespace __attribute__((visibility("hidden"))) A
{
}
```
Diags:
```
test.cpp:1:49: error: expected identifier or '{'
namespace __attribute__((visibility("hidden"))) A
^
test.cpp:1:49: error: C++ requires a type specifier for all declarations
test.cpp:3:2: error: expected ';' after top level declarator
}
```
This patch adds support for `namespace <gnu attributes> identifier` and also forbids gnu attributes for nested namespaces (this already done for C++ attributes).
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D121245
2022-03-15 22:30:22 +03:00
..
2021-10-04 14:16:47 -05:00
2022-02-07 15:29:36 -05:00
2021-05-20 12:39:04 -04:00
2022-02-07 15:29:36 -05:00
2021-05-13 11:48:32 -04:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2021-01-27 15:45:35 -05:00
2022-02-24 15:30:30 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-24 15:30:30 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2021-06-02 10:21:26 -04:00
2021-09-28 10:00:15 -07:00
2022-02-08 13:38:07 -05:00
2021-03-24 14:42:27 +01:00
2021-12-16 07:58:51 -05:00
2021-03-24 14:42:27 +01:00
2021-09-28 10:00:15 -07:00
2021-09-28 06:02:29 -07:00
2022-01-18 11:59:08 -05:00
2021-05-16 10:42:52 -07:00
2021-03-05 18:20:09 -08:00
2021-03-30 13:53:55 +02:00
2022-02-28 19:21:08 -06:00
2021-10-08 07:13:45 -04:00
2021-03-30 13:53:55 +02:00
2022-02-08 12:10:47 -05:00
2021-09-15 09:54:49 -04:00
2021-10-04 14:16:47 -05:00
2021-10-04 14:16:47 -05:00
2021-09-28 10:00:15 -07:00
2021-08-10 15:03:08 +02:00
2021-03-30 13:53:55 +02:00
2021-10-18 10:00:21 +02:00
2021-11-26 10:56:54 +01:00
2021-12-13 23:32:25 +08:00
2021-06-26 00:08:02 +02:00
2021-09-28 06:02:29 -07:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2021-12-06 12:52:01 -05:00
2022-02-07 15:29:36 -05:00
2022-01-05 14:49:03 +08:00
2021-07-28 07:37:56 -04:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2021-10-27 01:28:35 +00:00
2022-02-07 15:29:36 -05:00
2021-05-21 11:14:01 +02:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-07 15:29:36 -05:00
2022-02-09 09:11:49 -05:00
2022-03-15 22:30:22 +03:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-03-14 21:45:31 +01:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2021-09-28 10:00:15 -07:00
2021-07-26 15:04:34 +01:00
2021-07-26 15:04:34 +01:00
2021-01-06 20:39:57 +00:00
2021-07-26 15:04:34 +01:00
2021-02-05 07:20:41 -05:00
2022-02-09 09:11:49 -05:00
2021-11-17 08:24:26 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2021-01-08 11:37:27 +00:00
2020-12-31 00:27:11 -08:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2021-03-17 07:52:34 -04:00
2022-03-14 23:40:17 +01:00
2021-02-11 16:44:41 +03:00
2022-02-11 15:51:08 +01:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2021-06-02 10:30:24 -04:00
2022-02-09 09:11:49 -05:00