[all-commits] [llvm/llvm-project] 576708: Fix infinite recursion in deferred diag emitter

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Wed Apr 1 19:20:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5767085c8de97d15d7fb5433f22bb5b858cc4f3a
      https://github.com/llvm/llvm-project/commit/5767085c8de97d15d7fb5433f22bb5b858cc4f3a
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/OpenMP/nvptx_target_exceptions_messages.cpp

  Log Message:
  -----------
  Fix infinite recursion in deferred diag emitter

Currently deferred diagnostic emitter checks variable decl in DeclRefExpr, which
causes infinite recursion for cases like long a = (long)&a;.

Deferred diagnostic emitter does not need check variable decls in DeclRefExpr
since reference of a variable does not cause emission of functions directly or
indirectly. Therefore there is no need to check variable decls in DeclRefExpr.

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




More information about the All-commits mailing list