[PATCH] D47896: [CodeComplete] suppress define X X macros

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 8 02:09:59 PDT 2018


ilya-biryukov added a comment.

In https://reviews.llvm.org/D47896#1126171, @sammccall wrote:

> Hmm, musl does `#define stderr (stderr)` :-( And they discussed #define stderr (stderr+0).
>  (To enforce it's not assigned to etc)
>  https://github.com/cloudius-systems/musl/blob/master/include/stdio.h#L61
>
> Ilya also pointed out offline the windows API convention: CreateFile is a macro for CreateFileW or CreateFileA. In these cases merely suppressing the macro isn't enough, we'd want to replace its info with the underlying decl.
>
> Not sure how/whether to generalize this hack...


Yeah, I'm not sure. Maybe we should just special-case the known cases...


Repository:
  rC Clang

https://reviews.llvm.org/D47896





More information about the cfe-commits mailing list