[cfe-dev] clang++ assertion

Andreas Rechberger andreas.rechberger at hotmail.com
Wed Aug 7 12:47:04 PDT 2013


Many thanks for running the trial.
I have followed the instructions, tried to minimize as much as possible 
and filed the issue with source and preprocessed input attached.
/Andreas
> Doesn't reproduce for me - but that could be due to a difference in
> the implementation of <functional>, etc - please follow the steps in
> the crash report to file a bug/reproducer that should be reliable (the
> Clang crash report handling will instruct you to attach a .sh and .ii
> file with the preprocessed source). If that doesn't work on windows -
> please provide the full command line (preferably the post-driver
> command line (run the driver with -### to see this)) and the
> preprocessed source.
>
> On Wed, Aug 7, 2013 at 6:50 AM, Andreas Rechberger
> <andreas.rechberger at hotmail.com> wrote:
>> Hi All,
>>
>> Running
>> clang++ -c -std=c++11 test.cpp
>> will cause a debug assertion.
>>
>> Assertion failed: isa<X>(Val) && "cast_or_null<Ty>() argument of
>> incompatible type!", file
>> E:\Andreas\PhD\Code\llvm\include\llvm/Support/Casting.h, line 250
>> clang++.exe: error: clang frontend command failed with exit code 3 (use -v
>> to see invocation)
>>
>> g++ reply to the code would be something like:
>> test.cpp: In constructor 'Test::Test()':
>> test.cpp:7:48: error: no matching function for call to
>> 'std::function<void()>::function(void (Test::*)())'
>>           std::function <void(void) > x(&Test::Me);
>> ...
>>
>> The clang/llvm version I used is r187356.
>> (Windows, Visual Studio 10.0)
>> Unfortunately my current hardware-setup does not allow me to run a test
>> against the most recent trunk.
>> I can offer to file a bug, or run this case against the most recent trunk in
>> my next update cycle (probably in 2 weeks ...),
>> unless someone is kind enough to run a short trial on a more recent version
>> than mine.
>>
>> /Andreas
>>
>> ______________________________ test.cpp
>> #include <functional>
>>
>> class Test {
>> public:
>>      Test()
>>      {
>>          std::function <void(void) > x(&Test::Me);
>>      }
>>      void Me()
>>      {}
>> };
>> ______________________________ test.cpp
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list