Issue 63859
Summary Overly aggressive "unterminated '#pragma clang attribute push' at end of file" error
Labels new issue
Assignees
Reporter tweenk
    This error should be reported only at the end of a translation unit, not at the end of a file. Otherwise it prevents the following useful usage pattern:

some_header.h:

```
#include "defs.inc"
inline uint32_t add_with_rollover(uint32_t x)  {
  return x + 1;
}
#include "undefs.inc"
```

defs.inc:

```
#pragma clang attribute push(__attribute__((no_sanitize("unsigned-integer-overflow)), apply_to=function)
```

undefs.inc:

```
#pragma clang attribute pop
```

Currently this will give an error at the end of defs.inc, but I think it should not give an error at all. It should only give an error if the pop is missing from undefs.inc.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to