[PATCH] D57196: Fix error in Visual Studio due to __has_cpp_attribute

Haozhun Jin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 12:58:28 PST 2019


haozhun added a comment.

Thank you for your review.

> This is a Visual Studio bug with their IntelliSense implementation. http://eel.is/c++draft/cpp.cond#5 says the pp-tokens are to be interpreted as an attribute-token, which includes attribute-scoped-tokens.

Thank you for pointing this out and providing citations. I understand that Windows is  a supported platform of LLVM. As a result, I suppose it doesn't matter whose fault this is.

> IntelliSense squiggly lines often do not match the compiler behavior (IntelliSense uses a different frontend than cl, from what I understand); why do we need to work around it here? I guess I don't understand what problem this is solving given that the compilation succeeds.

If there isn't already a policy/consensus on whether IntelliSense errors should be avoided (especially in header files), it would be a judgement call.

However, I would expect that the choice had been made in the past. If IntelliSense misbehavior are indeed "often" (as you said), and given that there aren't other IntelliSense complaints of header files in the code base (as far as I can tell), it is likely that a choice had been made in the past that IntelliSense errors should be avoided.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57196/new/

https://reviews.llvm.org/D57196





More information about the llvm-commits mailing list