[all-commits] [llvm/llvm-project] 2f7269: Fix compiler crash when an expression parsed in th...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Tue Jun 2 11:46:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f7269b6773de2750f9cd1417ef5f21cd6cf7a91
      https://github.com/llvm/llvm-project/commit/2f7269b6773de2750f9cd1417ef5f21cd6cf7a91
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M clang/include/clang/Basic/TokenKinds.def
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Parse/ParseTentative.cpp
    M clang/lib/Parse/Parser.cpp
    A clang/test/AST/alignas_maybe_odr_cleanup.cpp

  Log Message:
  -----------
  Fix compiler crash when an expression parsed in the tentative parsing and must be claimed in the another evaluation context.

Summary:
Clang crashes when trying to finish function body. MaybeODRUseExprs is
not empty because of const static data member parsed in outer evaluation
context, upon call for isTypeIdInParens() function. It builds
annot_primary_expr, later parsed in ParseConstantExpression() in
inner constant expression evaluation context.

Reviewers: rjmccall, rsmith

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80925




More information about the All-commits mailing list