[llvm-branch-commits] [flang] [flang][OpenMP] Move check for substring to semantic checks (PR #201384)
CHANDRA GHALE via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 4 03:05:45 PDT 2026
================
@@ -4276,24 +4276,28 @@ void OmpStructureChecker::CheckVarIsNotPartOfAnotherVar(
void OmpStructureChecker::CheckVarIsNotPartOfAnotherVar(
const parser::CharBlock &source, const parser::OmpObject &object,
llvm::StringRef clause) {
- bool report{false};
- if (auto *symbol{GetObjectSymbol(object)}) {
+ if (const Symbol *symbol{GetObjectSymbol(object)}) {
if (IsTypeParamInquiry(*symbol)) {
return;
}
- report = IsStructureComponent(*symbol);
- }
+ llvm::StringRef kind{};
+ if (IsStructureComponent(*symbol)) {
+ kind = "A structure component";
+ } else if (IsSubstring(object, &context_)) {
+ kind = "A substrincg";
----------------
chandraghale wrote:
Is this a typo **"substrincg"** ? Should be "A substring".
https://github.com/llvm/llvm-project/pull/201384
More information about the llvm-branch-commits
mailing list