HomePhabricator

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

Authored by nullptr.cpp on Sep 1 2020, 5:45 AM.

Description

[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

Details

Committed
ABataevSep 1 2020, 5:45 AM
Reviewer
ABataev
Differential Revision
D86858: [OpenMP] Fix infinite loop in Sema::isOpenMPGlobalCapturedDecl()
Parents
rGbd6ee511502f: [NFC][Asan] Format includes
Branches
Unknown
Tags
Unknown