<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Regression: clang crashes when processing operator() call in a lambda"
   href="https://bugs.llvm.org/show_bug.cgi?id=43242">43242</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression: clang crashes when processing operator() call in a lambda
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>wyehia@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This started failing some time after SVN change #370966 (it was clean with
370966).

<span class="quote">> cat t.cpp</span >
int main() {
 [&](int x){ operator()(); }();
}

<span class="quote">> clang++ -std=c++11 -c t.cpp</span >
t.cpp:2:14: error: use of undeclared 'operator()'
 [&](int x){ operator()(); }();
             ^
             this->
t.cpp:2:2: note: must qualify identifier to find this declaration in dependent
base class
 [&](int x){ operator()(); }();
 ^
t.cpp:2:14: error: call to non-static member function without an object
argument
 [&](int x){ operator()(); }();
             ^~~~~~~~
clang-10: ~/Source/llvm-project/clang/include/clang/AST/Type.h:659: const
clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const: Assertion
`!isNull() && "Cannot retrieve a
 NULL type pointer"' failed.   
Stack dump:
0.      Program arguments: /home/wyehia/build/bin/clang-10 -cc1 -triple
powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name t.cpp -mrelocation-model static -mthread-model posix
-mframe-pointer=all -fmath-errno -masm-verbose -mconstructor-aliases
-fuse-init-array -target-cpu ppc64le -mfloat-abi hard -target-abi elfv2
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /tmp/t.gcno
-resource-dir /home/wyehia/build/lib/clang/10.0.0 -internal-isystem
/usr/lib/gcc/powerpc64le-linux-gnu/7.3.0/../../../../include/c++/7.3.0
-internal-isystem
/usr/lib/gcc/powerpc64le-linux-gnu/7.3.0/../../../../include/powerpc64le-linux-gnu/c++/7.3.0
-internal-isystem
/usr/lib/gcc/powerpc64le-linux-gnu/7.3.0/../../../../include/powerpc64le-linux-gnu/c++/7.3.0
-internal-isystem
/usr/lib/gcc/powerpc64le-linux-gnu/7.3.0/../../../../include/c++/7.3.0/backward
-internal-isystem /home/wyehia/build/lib/clang/10.0.0/include/ppc_wrappers
-internal-isystem /usr/local/include -internal-isystem
/home/wyehia/build/lib/clang/10.0.0/include -internal-externc-isystem
/usr/include/powerpc64le-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 0
-fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -faddrsig -o t.o -x c++ t.cpp
1.      t.cpp:2:29: current parser token '('
2.      t.cpp:1:12: parsing function body 'main'
3.      t.cpp:1:12: in compound statement ('{}')
4.      t.cpp:2:2: lambda expression parsing
 #0 0x00007caa60c36d04 PrintStackTraceSignalHandler(void*)
(/home/wyehia/build/bin/../lib/libLLVMSupport.so.10svn+0x1d6d04)
 #1 0x00007caa60c33f38 llvm::sys::RunSignalHandlers()
(/home/wyehia/build/bin/../lib/libLLVMSupport.so.10svn+0x1d3f38)
 #2 0x00007caa60c37150 SignalHandler(int)
(/home/wyehia/build/bin/../lib/libLLVMSupport.so.10svn+0x1d7150)
 #3 0x00007caa66c604d8 (linux-vdso64.so.1+0x4d8)
 #4 0x00007caa5edee98c __libc_signal_restore_set
/build/glibc-uvws04/glibc-2.27/signal/../sysdeps/unix/sysv/linux/nptl-signals.h:80:0
 #5 0x00007caa5edee98c raise
/build/glibc-uvws04/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:48:0
 #6 0x00007caa5edf0be0 abort /build/glibc-uvws04/glibc-2.27/stdlib/abort.c:79:0
 #7 0x00007caa5eddbb38 __assert_fail_base
/build/glibc-uvws04/glibc-2.27/assert/assert.c:92:0
 #8 0x00007caa5eddbbe4 __assert_fail
/build/glibc-uvws04/glibc-2.27/assert/assert.c:101:0
 #9 0x00007caa5cb43f6c clang::Sema::BuildCXXThisExpr(clang::SourceLocation,
clang::QualType, bool)
(/home/wyehia/build/bin/../lib/../lib/libclangSema.so.10svn+0x4e3f6c)
#10 0x00007caa5cc1841c clang::Sema::BuildCaptureInit(clang::sema::Capture
const&, clang::SourceLocation, bool)
(/home/wyehia/build/bin/../lib/../lib/libclangSema.so.10svn+0x5b841c)
#11 0x00007caa5cc18dc8 clang::Sema::BuildLambdaExpr(clang::SourceLocation,
clang::SourceLocation, clang::sema::LambdaScopeInfo*)
(/home/wyehia/build/bin/../lib/../lib/libclangSema.so.10svn+0x5b8dc8)
#12 0x00007caa5cc1866c clang::Sema::ActOnLambdaExpr(clang::SourceLocation,
clang::Stmt*, clang::Scope*)
(/home/wyehia/build/bin/../lib/../lib/libclangSema.so.10svn+0x5b866c)
#13 0x00007caa5d165944
clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0x95944)
#14 0x00007caa5d163150 clang::Parser::ParseLambdaExpression()
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0x93150)
#15 0x00007caa5d1525e8 clang::Parser::ParseCastExpression(bool, bool, bool&,
clang::Parser::TypeCastState, bool)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0x825e8)
#16 0x00007caa5d14d5cc
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0x7d5cc)
#17 0x00007caa5d14d480
clang::Parser::ParseExpression(clang::Parser::TypeCastState)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0x7d480)
#18 0x00007caa5d1a856c
clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0xd856c)
#19 0x00007caa5d1a68fc
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/wyehia/build/bin/../lib/../lib/libclangParse.so.10svn+0xd68fc)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>