<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 - Assertion failure in in PaddingChecker::visitRecord"
   href="https://bugs.llvm.org/show_bug.cgi?id=39971">39971</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in in PaddingChecker::visitRecord
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hokein@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat test-PaddingChecker__visitRecord.cc
namespace a {
template <typename b> struct atomic { b c; };
}
typedef long d;
struct e {
  alignas(64) a::atomic<d> f;
  d g;
  alignas(64) a::atomic<d> h;
  char i[64 - sizeof(d)];
};

$ ./clang-tidy -checks="clang-analyzer*" test-PaddingChecker__visitRecord.cc --
-std=c++11
F1212 11:16:58.700911   40300 logging.cc:82] assert.h assertion failed at
third_party/llvm/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:108
in void (anonymous namespace)::PaddingChecker::visitRecord(const
clang::RecordDecl *, uint64_t) const: !DiffPad.isNegative() && "DiffPad should
not be negative"
*** Check failure stack trace: ***
    @     0x5630d023a4f9  (anonymous namespace)::PaddingChecker::visitRecord()
    @     0x5630d022a00d  clang::RecursiveASTVisitor<>::TraverseCXXRecordDecl()
    @     0x5630d0225c8b  clang::RecursiveASTVisitor<>::TraverseDecl()
    @     0x5630d022c1d9 
clang::RecursiveASTVisitor<>::TraverseTranslationUnitDecl()
    @     0x5630d0225f4c  clang::RecursiveASTVisitor<>::TraverseDecl()
    @     0x5630d02243f7  clang::ento::check::ASTDecl<>::_checkDecl<>()
    @     0x5630d04812bf  clang::ento::CheckerManager::runCheckersOnASTDecl()
    @     0x5630d019f6d9  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @     0x5630d071320c  clang::MultiplexConsumer::HandleTranslationUnit()
    @     0x5630d08ce414  clang::ParseAST()
    @     0x5630d070cd63  clang::FrontendAction::Execute()
    @     0x5630d05c17e1  clang::CompilerInstance::ExecuteAction()
    @     0x5630d051a7d1 
clang::tooling::FrontendActionFactory::runInvocation()
    @     0x5630cfe1cc27 
clang::tidy::runClangTidy()::ActionFactory::runInvocation()
    @     0x5630d051a53a  clang::tooling::ToolInvocation::runInvocation()
    @     0x5630d0519f26  clang::tooling::ToolInvocation::run()
    @     0x5630d051c625  clang::tooling::ClangTool::run()
    @     0x5630cfe1896f  clang::tidy::runClangTidy()</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>