[all-commits] [llvm/llvm-project] 2114f7: [OpenMP] Fix infinite loop in Sema::isOpenMPGlobal...

nullptr-cpp via All-commits all-commits at lists.llvm.org
Tue Sep 1 05:46:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2114f71aaa8dc2e75fe9cd79aa4d72d164e9b95d
      https://github.com/llvm/llvm-project/commit/2114f71aaa8dc2e75fe9cd79aa4d72d164e9b95d
  Author: Yang Fan <nullptr.cpp at gmail.com>
  Date:   2020-09-01 (Tue, 01 Sep 2020)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp

  Log Message:
  -----------
  [OpenMP] Fix infinite loop in Sema::isOpenMPGlobalCapturedDecl()

Function Sema::isOpenMPGlobalCapturedDecl() has a parameter `unsigned Level`,
but use `Level >= 0` as the condition of `while`, thus cause an infinite loop.
Fix by changing the loop condition to `Level > 0`.

Reviewed By: ABataev

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




More information about the All-commits mailing list