<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Clang can operate in Visual Studio compatibility mode, in which case it will define both _MSC_VER and __clang__. The check you posted ensures that the compiler is actually MSVC and not clang in MSVC compatibility mode.
<a href="https://clang.llvm.org/docs/MSVCCompatibility.html">https://clang.llvm.org/docs/MSVCCompatibility.html</a> has more information on the MSVC compatibility.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">cfe-dev <cfe-dev-bounces@lists.llvm.org> on behalf of cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Reply-To: </b>Christiano SA <christiano@engineer.com><br>
<b>Date: </b>Sunday, April 15, 2018 at 6:39 PM<br>
<b>To: </b>cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Subject: </b>[cfe-dev] [libc++] #if defined(_MSC_VER) && !defined(__clang__)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a name="_MailOriginalBody">The line 14 of include/__config has the following code: #if defined(_MSC_VER) &&  !defined(__clang__) . I know that the compiler clang defines __clang__ and Visual Studio defines _MSC_VER,
 however, why should it test the __clang__ if it would only be tested if it is being compiled on Visual Studio, which doesn't have __clang__ anyway?<o:p></o:p></a></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="mso-bookmark:_MailOriginalBody">_______________________________________________<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="mso-bookmark:_MailOriginalBody">cfe-dev mailing list<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="mso-bookmark:_MailOriginalBody"></span><a href="mailto:cfe-dev@lists.llvm.org"><span style="mso-bookmark:_MailOriginalBody">cfe-dev@lists.llvm.org</span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="mso-bookmark:_MailOriginalBody"></span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=5yX5V4blPPfpifwRnJX-AgAIhcgD5YjC1gKFgzNnnoA&s=UVQvhd6zG2oH9ZhCV4ZwFtR8DmQBlMLedrUf6ZIjTKQ&e="><span style="mso-bookmark:_MailOriginalBody">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=5yX5V4blPPfpifwRnJX-AgAIhcgD5YjC1gKFgzNnnoA&s=UVQvhd6zG2oH9ZhCV4ZwFtR8DmQBlMLedrUf6ZIjTKQ&e=</span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="mso-bookmark:_MailOriginalBody"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>