[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field
authorMike Rice <michael.p.rice@intel.com>
Wed, 17 Jul 2019 15:18:45 +0000 (15:18 +0000)
committerMike Rice <michael.p.rice@intel.com>
Wed, 17 Jul 2019 15:18:45 +0000 (15:18 +0000)
commit552c2c09d354a3ad9c1c9647e0a3bb5099c31088
treeacc4e9a4ecab2104b4e0894c6a2ea50218a6cb45
parent11d3710c1cd25adf23a4690076e12d6ece267731
[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

checkDecl is only valid for VarDecls or FieldDecls, since getCanonicalDecl
expects only these. Prevent other Decl kinds (such as CXXMethodDecls and
EnumConstantDecls) from entering and asserting.

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

llvm-svn: 366336
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/for_loop_messages.cpp