[all-commits] [llvm/llvm-project] 6f0763: [OpenACC/OpenMP/Parser] Teach ParseCXXInlineMethod...
Erich Keane via All-commits
all-commits at lists.llvm.org
Wed Aug 5 09:44:08 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6f0763dc33d18b5ba1e43a64b1c4d089459e2fa8
https://github.com/llvm/llvm-project/commit/6f0763dc33d18b5ba1e43a64b1c4d089459e2fa8
Author: Erich Keane <ekeane at nvidia.com>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/lib/Parse/ParseCXXInlineMethods.cpp
A clang/test/OpenMP/gh214195.cpp
M clang/test/ParserOpenACC/parse-constructs.cpp
Log Message:
-----------
[OpenACC/OpenMP/Parser] Teach ParseCXXInlineMethods about pragmas (#214259)
Both OMP and OpenACC count on being able to reach their end-annotation
token in order to properly recover from errors/leave the parser in good
shape. This works well for 'free' functions.
However, when we do a pre-parse so we can delay-evaluate member
functions, a stray end-brace can end up matching the end of the
function. As a result, the examples in the test would have that brace
ending with an EOF, which confused both of the pragma languages.
This patch teaches the ParseCXXInlineMethods functionality to ignore any
braces/etc inside of a OpenACC/OpenMP pragma for the purposes of
matching, since these shouldn't count towards that scoping anyway.
Fixes: #214195
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list