| Issue |
56077
|
| Summary |
Compiler no longer accepting certain form of deprecated attribute after commit 8c7b64b5ae2a
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
dyung
|
One of our internal tests started giving a compile error on a deprecated attribute lately and I bisected it back to commit 8c7b64b5ae2a. Consider the following code:
```
[[deprecated( "use bar instead" )]]
extern "C" int foo();
```
When compiled using a compiler built prior to 8c7b64b5ae2a, this code would compile cleanly. However, once we try a compiler built that includes 8c7b64b5ae2a, we get an error:
```
$ ~/src/upstream/8c7b64b5ae2a-linux/bin/clang -c test.cpp
test.cpp:1:1: error: an attribute list cannot appear here
[[deprecated( "use bar instead" )]]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
I believe this should be a valid form of the deprecated attribute and the compiler seems to be parsing it incorrectly.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs