<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 26, 2014 at 12:51 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Wed, Feb 26, 2014 at 3:45 PM, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com">timurrrr@google.com</a>> wrote:<br>

> Hi Joerg,<br>
><br>
> I don't see where __func__ is explicitly defined and this does break<br>
> my ASan Windows build.<br>
<br>
</div>It's set via CMake in r202296.<br></blockquote><div><br></div>The define didn't make it through to the compile line:<div><div>[43/54] Building CXX object projects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.i386.dir\sanitizer_common.cc.obj</div>
<div>FAILED: "C:/Program Files (x86)/CMake 2.8/bin/cmcldeps.exe" CXX ..\projects\compiler-rt\lib\sanitizer_common\sanitizer_common.cc "projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_common.cc.obj.d" projects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.i386.dir\sanitizer_common.cc.obj  "Note: including file: "  "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe" C:\PROGRA~2\MICROS~4.0\VC\bin\cl.exe   /nologo /TP /DWIN32 /D_WINDOWS /W3   /MT /O2 /Ob2 -Iprojects\compiler-rt\lib\sanitizer_common -I..\projects\compiler-rt\lib\sanitizer_common -Iinclude -I..\include    -UNDEBUG -wd4146 -wd4180 -wd4244 -wd4267 -wd4345 -wd4351 -wd4355 -wd4503 -wd4624 -wd4800 -wd4291 -w14062 -we4238  /MT /Oy- /GS- /O2 /Zi /wd4722 /GR-  -DSANITIZER_NEEDS_SEGV=0 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /Foprojects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.i386.dir\sanitizer_common.cc.obj /Fdprojects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.i386.dir/ /FS -c ..\projects\compiler-rt\lib\sanitizer_common\sanitizer_common.cc</div>
<div>..\projects\compiler-rt\lib\sanitizer_common\sanitizer_common.cc(96) : error C2065: '__func__' : undeclared identifier</div></div><div><br></div><div>Sorry I didn't get back to you about this earlier.  I just don't think we should try to define macros in the implementer's namespace.  Typically we do things like LLVM_FUNC or LLVM_CONSTEXPR, but what's the real motivation?  You said __FUNCTION__ has weird semantics.  Can you elaborate on the downsides?</div>
</div></div></div>