diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2025-05-28 10:07:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-28 10:07:14 -0400 |
commit | 5e28af04f32455f93975e227d08f502faa45247c (patch) | |
tree | aae4a86be7e8ff83763a01ce63b1a9e8e45293af /clang/lib/AST/ByteCode/Interp.cpp | |
parent | 2b1ebef8b8a5af7092de80daafd2743683d0e8c8 (diff) | |
download | llvm-5e28af04f32455f93975e227d08f502faa45247c.zip llvm-5e28af04f32455f93975e227d08f502faa45247c.tar.gz llvm-5e28af04f32455f93975e227d08f502faa45247c.tar.bz2 |
[C] Fix parsing of [[clang::assume]] (#141747)
The assumption attribute is exposed with a Clang spelling, which means
we support __attribute__((assume)) as well as [[clang::assume]] as
spellings for the attribute.
In C++, the [[clang::assume]] spelling worked as expected. In C, that
spelling would emit an "unknown attribute ignored" diagnostic. This was
happening because we were failing to pass in the scope name and source
location when creating the attribute. In C++, this worked by chance
because [[assume]] is a known attribute in C++. But in C, where there is
thankfully no [[assume]] standard attribute, the lack of a scope meant
we would set the attribute kind to "unknown".
Diffstat (limited to 'clang/lib/AST/ByteCode/Interp.cpp')
0 files changed, 0 insertions, 0 deletions