rsmith added a comment. Under http://eel.is/c++draft/cpp#cond-7.sentence-2, the identifier `__has_include` can't appear anywhere other than in the context of an `#if`, `#elif`, `#iifdef`, or `#ifndef`. That's what we should be checking for and diagnosing here (and we should produce an `ExtWarn` rather than a `Warning` for this case, because such code is ill-formed, and accepting it at all is a language extension compared to the C++ rules). We should apply the same behavior to `__has_cpp_attribute`, to which the same rule applies.
Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49091/new/ https://reviews.llvm.org/D49091 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits