Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-12 Thread Eric Fiselier via cfe-commits
Seems to be working now.

Thank you!

On Thu, Jan 11, 2018 at 9:46 PM, Richard Trieu  wrote:

> Hi Vedant and Eric,
>
> Please retry after r322350.  I suspect an interaction between templates
> and friend functions is causing this issue.  This revision disables hashing
> for friend functions for now.
>
> Richard
>
> On Thu, Jan 11, 2018 at 3:34 PM, Eric Fiselier  wrote:
>
>> I'm hitting the same issue as well.
>>
>> Please let me know if there is anything I can do to get this fixed
>> quickly.
>>
>> /Eric
>>
>> On Wed, Jan 3, 2018 at 5:20 PM, Richard Trieu via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> Vedant,
>>>
>>> I'm looking into it.
>>>
>>>
>>> On Wed, Jan 3, 2018 at 11:12 AM, Vedant Kumar  wrote:
>>>
 Oops, the build log was too big to attach. Resending with just the bot
 link, then:
 http://lab.llvm.org:8080/green/view/Experimental/job/clang-s
 tage2-coverage-R/2193/consoleText

 vedant

 On Jan 3, 2018, at 11:09 AM, Vedant Kumar  wrote:

 Hi Richard,

 This commit is causing an unexpected build failure in the stage2
 modules-enabled coverage bot. I've attached the build log. Here's the 
 error:

 [3685/3899] 
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
 -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
  
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
 -fPIC -fvisibility-inlines-hidden -Werror=date-time 
 -Werror=unguarded-availability-new -std=c++11 -fmodules 
 -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
 -Wmissing-field-initializers -pedantic -Wno-long-long 
 -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
 -Wstring-conversion -fcolor-diagnostics 
 -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
 FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
 -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
  
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
 -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
 -fPIC -fvisibility-inlines-hidden -Werror=date-time 
 -Werror=unguarded-availability-new -std=c++11 -fmodules 
 -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
 -Wmissing-field-initializers -pedantic -Wno-long-long 
 -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
 -Wstring-conversion -fcolor-diagnostics 
 -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
 tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
 In module 'std' imported from 
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/Config.h:16:
 /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
  error: 'std::__1::operator==' has different definitions in different 
 modules; definition in module 'std.list' first difference is function body
 bool operator==(const __list_iterator& __x, const __list_iterator& __y)
 ~^~
 

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-11 Thread Richard Trieu via cfe-commits
Hi Vedant and Eric,

Please retry after r322350.  I suspect an interaction between templates and
friend functions is causing this issue.  This revision disables hashing for
friend functions for now.

Richard

On Thu, Jan 11, 2018 at 3:34 PM, Eric Fiselier  wrote:

> I'm hitting the same issue as well.
>
> Please let me know if there is anything I can do to get this fixed quickly.
>
> /Eric
>
> On Wed, Jan 3, 2018 at 5:20 PM, Richard Trieu via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Vedant,
>>
>> I'm looking into it.
>>
>>
>> On Wed, Jan 3, 2018 at 11:12 AM, Vedant Kumar  wrote:
>>
>>> Oops, the build log was too big to attach. Resending with just the bot
>>> link, then:
>>> http://lab.llvm.org:8080/green/view/Experimental/job/clang-s
>>> tage2-coverage-R/2193/consoleText
>>>
>>> vedant
>>>
>>> On Jan 3, 2018, at 11:09 AM, Vedant Kumar  wrote:
>>>
>>> Hi Richard,
>>>
>>> This commit is causing an unexpected build failure in the stage2
>>> modules-enabled coverage bot. I've attached the build log. Here's the error:
>>>
>>> [3685/3899] 
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>>>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
>>> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>>>  
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>>>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
>>> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>>> -Werror=unguarded-availability-new -std=c++11 -fmodules 
>>> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>>>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>>> -Wstring-conversion -fcolor-diagnostics 
>>> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>>>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
>>> FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>>>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
>>> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>>>  
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>>>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
>>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
>>> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>>> -Werror=unguarded-availability-new -std=c++11 -fmodules 
>>> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>>>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>>> -Wstring-conversion -fcolor-diagnostics 
>>> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>>>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
>>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
>>> In module 'std' imported from 
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/Config.h:16:
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>>>  error: 'std::__1::operator==' has different definitions in different 
>>> modules; definition in module 'std.list' first difference is function body
>>> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
>>> ~^~
>>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>>>  note: but in 'std.list' found a different body
>>> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
>>> ~^~

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-11 Thread Eric Fiselier via cfe-commits
I'm hitting the same issue as well.

Please let me know if there is anything I can do to get this fixed quickly.

/Eric

On Wed, Jan 3, 2018 at 5:20 PM, Richard Trieu via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Vedant,
>
> I'm looking into it.
>
>
> On Wed, Jan 3, 2018 at 11:12 AM, Vedant Kumar  wrote:
>
>> Oops, the build log was too big to attach. Resending with just the bot
>> link, then:
>> http://lab.llvm.org:8080/green/view/Experimental/job/clang-
>> stage2-coverage-R/2193/consoleText
>>
>> vedant
>>
>> On Jan 3, 2018, at 11:09 AM, Vedant Kumar  wrote:
>>
>> Hi Richard,
>>
>> This commit is causing an unexpected build failure in the stage2
>> modules-enabled coverage bot. I've attached the build log. Here's the error:
>>
>> [3685/3899] 
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
>> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>>  
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
>> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>> -Werror=unguarded-availability-new -std=c++11 -fmodules 
>> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>> -Wstring-conversion -fcolor-diagnostics 
>> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
>> FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
>> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>>  
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
>> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
>> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>> -Werror=unguarded-availability-new -std=c++11 -fmodules 
>> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>> -Wstring-conversion -fcolor-diagnostics 
>> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
>> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
>> In module 'std' imported from 
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/Config.h:16:
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>>  error: 'std::__1::operator==' has different definitions in different 
>> modules; definition in module 'std.list' first difference is function body
>> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
>> ~^~
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>>  note: but in 'std.list' found a different body
>> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
>> ~^~
>> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:394:11:
>>  error: 'std::__1::operator!=' has different definitions in different 
>> modules; definition in module 'std.list' first difference is function body
>>  bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
>>  

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-03 Thread Richard Trieu via cfe-commits
Vedant,

I'm looking into it.

On Wed, Jan 3, 2018 at 11:12 AM, Vedant Kumar  wrote:

> Oops, the build log was too big to attach. Resending with just the bot
> link, then:
> http://lab.llvm.org:8080/green/view/Experimental/job/
> clang-stage2-coverage-R/2193/consoleText
>
> vedant
>
> On Jan 3, 2018, at 11:09 AM, Vedant Kumar  wrote:
>
> Hi Richard,
>
> This commit is causing an unexpected build failure in the stage2
> modules-enabled coverage bot. I've attached the build log. Here's the error:
>
> [3685/3899] 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>  
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -std=c++11 -fmodules 
> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wmissing-field-initializers -pedantic -Wno-long-long 
> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
> -Wstring-conversion -fcolor-diagnostics 
> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
> FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>  
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -std=c++11 -fmodules 
> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wmissing-field-initializers -pedantic -Wno-long-long 
> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
> -Wstring-conversion -fcolor-diagnostics 
> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
> In module 'std' imported from 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/Config.h:16:
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>  error: 'std::__1::operator==' has different definitions in different 
> modules; definition in module 'std.list' first difference is function body
> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
> ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>  note: but in 'std.list' found a different body
> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
> ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:394:11:
>  error: 'std::__1::operator!=' has different definitions in different 
> modules; definition in module 'std.list' first difference is function body
>  bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
>  ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:394:11:
>  note: but in 'std.list' found a different body
>  bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
>  

Re: r321395 - [ODRHash] Support ODR violation detection in functions.

2018-01-03 Thread Vedant Kumar via cfe-commits
Oops, the build log was too big to attach. Resending with just the bot link, 
then:
http://lab.llvm.org:8080/green/view/Experimental/job/clang-stage2-coverage-R/2193/consoleText
 


vedant

> On Jan 3, 2018, at 11:09 AM, Vedant Kumar  wrote:
> 
> Hi Richard,
> 
> This commit is causing an unexpected build failure in the stage2 
> modules-enabled coverage bot. I've attached the build log. Here's the error:
> 
> [3685/3899] 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>  
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -std=c++11 -fmodules 
> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wmissing-field-initializers -pedantic -Wno-long-long 
> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
> -Wstring-conversion -fcolor-diagnostics 
> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
> FAILED: tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/bin/clang++
>-DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
> -D__STDC_LIMIT_MACROS -Itools/lld/COFF 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF
>  
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/include
>  -Itools/lld/include -I/usr/include/libxml2 -Iinclude 
> -I/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include 
> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -std=c++11 -fmodules 
> -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/module.cache
>  -fcxx-modules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wmissing-field-initializers -pedantic -Wno-long-long 
> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
> -Wstring-conversion -fcolor-diagnostics 
> -fprofile-instr-generate='/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/profiles/%6m.profraw'
>  -fcoverage-mapping -O3 -DNDEBUG-fno-exceptions -fno-rtti -MMD -MT 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -MF 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o.d -o 
> tools/lld/COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o -c 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/PDB.cpp
> In module 'std' imported from 
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/COFF/Config.h:16:
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>  error: 'std::__1::operator==' has different definitions in different 
> modules; definition in module 'std.list' first difference is function body
> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
> ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:389:10:
>  note: but in 'std.list' found a different body
> bool operator==(const __list_iterator& __x, const __list_iterator& __y)
> ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:394:11:
>  error: 'std::__1::operator!=' has different definitions in different 
> modules; definition in module 'std.list' first difference is function body
>  bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
>  ~^~
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/host-compiler/include/c++/v1/list:394:11:
>  note: but in 'std.list' found a different body
>  bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
>  

r321395 - [ODRHash] Support ODR violation detection in functions.

2017-12-22 Thread Richard Trieu via cfe-commits
Author: rtrieu
Date: Fri Dec 22 16:41:01 2017
New Revision: 321395

URL: http://llvm.org/viewvc/llvm-project?rev=321395=rev
Log:
[ODRHash] Support ODR violation detection in functions.

Extend the hashing to functions, which allows detection of function definition
mismatches across modules.  This is a re-commit of r320230.

Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/include/clang/AST/ODRHash.h
cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/lib/AST/ODRHash.cpp
cfe/trunk/lib/Serialization/ASTReader.cpp
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
cfe/trunk/test/Modules/odr_hash.cpp

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=321395=321394=321395=diff
==
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Fri Dec 22 16:41:01 2017
@@ -1759,6 +1759,11 @@ protected:
   unsigned IsCopyDeductionCandidate : 1;
 
 private:
+
+  /// Store the ODRHash after first calculation.
+  unsigned HasODRHash : 1;
+  unsigned ODRHash;
+
   /// \brief End part of this FunctionDecl's source range.
   ///
   /// We could compute the full range in getSourceRange(). However, when we're
@@ -1841,8 +1846,9 @@ protected:
 IsExplicitlyDefaulted(false), HasImplicitReturnZero(false),
 IsLateTemplateParsed(false), IsConstexpr(isConstexprSpecified),
 InstantiationIsPending(false), UsesSEHTry(false), 
HasSkippedBody(false),
-WillHaveBody(false), IsCopyDeductionCandidate(false),
-EndRangeLoc(NameInfo.getEndLoc()), DNLoc(NameInfo.getInfo()) {}
+WillHaveBody(false), IsCopyDeductionCandidate(false), 
HasODRHash(false),
+ODRHash(0), EndRangeLoc(NameInfo.getEndLoc()),
+DNLoc(NameInfo.getInfo()) {}
 
   using redeclarable_base = Redeclarable;
 
@@ -2439,6 +2445,10 @@ public:
   /// returns 0.
   unsigned getMemoryFunctionKind() const;
 
+  /// \brief Returns ODRHash of the function.  This value is calculated and
+  /// stored on first call, then the stored value returned on the other calls.
+  unsigned getODRHash();
+
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }
   static bool classofKind(Kind K) {

Modified: cfe/trunk/include/clang/AST/ODRHash.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ODRHash.h?rev=321395=321394=321395=diff
==
--- cfe/trunk/include/clang/AST/ODRHash.h (original)
+++ cfe/trunk/include/clang/AST/ODRHash.h Fri Dec 22 16:41:01 2017
@@ -53,6 +53,10 @@ public:
   // more information than the AddDecl class.
   void AddCXXRecordDecl(const CXXRecordDecl *Record);
 
+  // Use this for ODR checking functions between modules.  This method compares
+  // more information than the AddDecl class.
+  void AddFunctionDecl(const FunctionDecl *Function);
+
   // Process SubDecls of the main Decl.  This method calls the DeclVisitor
   // while AddDecl does not.
   void AddSubDecl(const Decl *D);

Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td?rev=321395=321394=321395=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td Fri Dec 22 
16:41:01 2017
@@ -270,6 +270,29 @@ def note_module_odr_violation_mismatch_d
   "friend function %2|"
   "}1">;
 
+def err_module_odr_violation_function : Error<
+  "%q0 has different definitions in different modules; "
+  "%select{definition in module '%2'|defined here}1 "
+  "first difference is "
+  "%select{"
+  "return type is %4|"
+  "%ordinal4 parameter with name %5|"
+  "%ordinal4 parameter with type %5%select{| decayed from %7}6|"
+  "%ordinal4 parameter with%select{out|}5 a default argument|"
+  "%ordinal4 parameter with a default argument|"
+  "function body"
+  "}3">;
+
+def note_module_odr_violation_function : Note<"but in '%0' found "
+  "%select{"
+  "different return type %2|"
+  "%ordinal2 parameter with name %3|"
+  "%ordinal2 parameter with type %3%select{| decayed from %5}4|"
+  "%ordinal2 parameter with%select{out|}3 a default argument|"
+  "%ordinal2 parameter with a different default argument|"
+  "a different body"
+  "}1">;
+
 def err_module_odr_violation_mismatch_decl_unknown : Error<
   "%q0 %select{with definition in module '%2'|defined here}1 has different "
   "definitions in different modules; first difference is this "

Modified: