<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJzNWEtz4zYM_jX2hROPqIclHXxIss7E0yT1rLM77V48FEnZ3MqUS1JO3F9fgPIj1mbTtM6hmUwigSTw4QNIAipqsR31hsHuN_jUCy57YUx4xfTiwimxvaAhmZq6qOSKOcVvVCUHfL0m7dzp3fhyNia2KVbKEUaKZkGMXNfGEVeTpXNr24tA4w38wpgdVNVmNajNAt4J04IozatGSOKWknDD7JIUjP_hDONy0JqYORAQ0azWqMmLggGBH0C1MGxFmFk0K6kdWuoAv6sXik_rJ2maNaJul1O_vBddy7rsRWOyZsZKQ5gjEhDVJSnBya5x8qTcsm4csdtVUVdEs5W0pBdmUtvGSLKtG7JkG0nQw4t2kvoL1CqNY4ZMLx9vSW2Ilc57K_VGmVojcrJhhgD_d3df7-ez3--vfr2bfBt_nuMSECOV61ppz6lyvTA_MAE0VqqAv8_ZcD6MLyqlm-eLhW7aAVQIPAxsPaAAdf7tIUZ4kd1amkwNqPQOPiLd488Pszmlhj3Na-uMZKux6oVXwXMYocUEntJSlHyYFEKWUS_5dDaE9HOjZ2qhWXULuVBJY8cbbzIJuiZ5SIP_aNJrLESeJGVXq0TZO7Wu3RJIEag12GulScRPoQpRxijbKz3Jx3aapCJ7N33tekhd7024NyxlQGN6YpkHaYGy_6wYQpN4KQ2ZdXPY7nwJIckgS6SBGIX0qm60eKiFtI9GyqtGVUIaGm6UVe7eT7fj6cMsnKdfUVSbsQeb8w7QXGaMn8uAKLNYdBlgKDtTcZkIWnYRByg7N2YZDbuKswhl5ypOExF1FYcoO09xGURJmP4QPJSdiziSlHWDJ1F2rmIalWFXMUfZuYqHaVF0OaYoO5uKIs9-oAJl_z8qfnJEUOp3_43ScB5kXno5e2wvFLhDH69rOEKeXXsahLJ7HCSSpWccB0dQ6X1TObWu5DNYtFAUmJC2NwvccNpWUMDU-otW7mfQTpGJIGc8-ghk2RRLjD0n8QxqqTFmE9q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Cg_earP_dwFQvkvu4FVZ20gLD0lE07S_HLEgSNI8z0OZDONCJFkehgHLSxGXPMtE2a9YISs7gpMX9o6WT8SrgGc4gPvnI1CjMACLlEY0ioZxNsizYhjFScJkJgKR0l4cwLGnqsOnv74ZeZX4PRAGK2Xd8btgH2jD9JEeMCB0ylVydH3cyj5ifY9i5CH8DWjgdAo>53177</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang-tidy crash
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jan-revay
      </td>
    </tr>
</table>

<pre>
    ```
$ clang-tidy-12 ProblematicFile.cpp 
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.    Program arguments: clang-tidy-12 LogicPowerup.cpp
1.    <eof> parser at end of file
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x23)[0x7fdfc65bdef3]
/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7fdfc65bc210]
/lib/x86_64-linux-gnu/libLLVM-12.so.1(+0xbd955f)[0x7fdfc65be55f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fdfcddf43c0]
clang-tidy-12[0x7e1d83]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee0141)[0x7fdfcc07b141]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers8internal21BoundNodesTreeBuilder12visitMatchesEPNS2_7VisitorE+0x9c)[0x7fdfcc09e8ac]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xedf84d)[0x7fdfcc07a84d]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xef5d1f)[0x7fdfcc090d1f]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee812f)[0x7fdfcc08312f]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee75d3)[0x7fdfcc0825d3]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xf03527)[0x7fdfcc09e527]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee3e1a)[0x7fdfcc07ee1a]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee13f2)[0x7fdfcc07c3f2]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee67bb)[0x7fdfcc0817bb]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee3b98)[0x7fdfcc07eb98]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xee13f2)[0x7fdfcc07c3f2]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers11MatchFinder8matchASTERNS_10ASTContextE+0x2ec)[0x7fdfcc05ea7c]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang17MultiplexConsumer21HandleTranslationUnitERNS_10ASTContextE+0x2c)[0x7fdfcd09ac3c]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang8ParseASTERNS_4SemaEbb+0x244)[0x7fdfcbad3d94]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7fdfcd069118]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x8a1)[0x7fdfccff6dd1]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling21FrontendActionFactory13runInvocationESt10shared_ptrINS_18CompilerInvocationEEPNS_11FileManagerES2_INS_22PCHContainerOperationsEEPNS_18DiagnosticConsumerE+0x1ad)[0x7fdfcd1da8ed]
clang-tidy-12[0x87f646]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation13runInvocationEPKcPNS_6driver11CompilationESt10shared_ptrINS_18CompilerInvocationEES7_INS_22PCHContainerOperationsEE+0x11a)[0x7fdfcd1da64a]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation3runEv+0x9d4)[0x7fdfcd1d9a74]
/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling9ClangTool3runEPNS0_10ToolActionE+0xba8)[0x7fdfcd1dbb28]
clang-tidy-12[0x87c377]
clang-tidy-12[0x45833d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fdfc54940b3]
clang-tidy-12[0x45612e]
Segmentation fault (core dumped)
```

Unfortunately I cannot include the code files as they are propertialy. I found a exact line that causes the problem.

Crash is caused by a line in a file "ProblematicFile.cpp" (I obfuscated the names because the code is propertialy):

```
if(some_namespace::class1_instance.class2_instance.X)  /// THIS LINE CAUSES THE CRASH
{
    ....
}
```

class1 is defined in an included header file "Header.h" that as a standalone file was parsed by clang-tidy successfully:

```
....

namespace some_namespace {
extern const class class1 : public base_class1 {
public:
    class class2 : public base_class2 {
    public:
        class2();
        static const unsigned X;
        static const unsigned Y;
        static const unsigned Z;
    } class2_instance;
} class1_instance;
};
  
....

```

However I was unable to reproduce the crash just from the code I provided here... base_class1 and base_class2 are quite large classes.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNWEtzIjcQ_jVwUZkazZsDB9uLy1Rsh1q8W8leKI2kAW0GDZE02OTXp1vDw8x6HSf4EIqCmZbUj69brW4VtdiOemmw-wafesFlL4wJr5heXDglthc0JFNTF5VcMaf4jarkgK_XpJ07vRtfzsbENsVKOcJI0SyIkevaOOJqsnRubXsRcLyBL4zZQVVtVoPaLOCdMC2I0rxqhCRuKQk3zC5JwfgfzjAuB62ImQMCEc1qjZw8KRgQ-IBWC8NWhJlFs5LaoaSO4nf1QvFp_SRNs0at2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