This is an archive of the discontinued LLVM Phabricator instance.

[clang] inheritance fix for nomerge attribute
ClosedPublic

Authored by xbolva00 on Feb 10 2022, 8:56 AM.

Diff Detail

Event Timeline

xbolva00 requested review of this revision.Feb 10 2022, 8:56 AM
xbolva00 created this revision.

It looks like the precommit CI caught a few more places where we need to add quotes in the diagnostic.

clang/test/Sema/attr-nomerge-ast.cpp
9–17

Might as well drop the line and column info (then we can update the test easier and not have to worry about also updating those values; they're not what's under test anyway).

clang/test/Sema/attr-nomerge.cpp
11

I dug out the standard and stared at it, I no longer think this behavior in incorrect.

https://eel.is/c++draft/stmt.stmt#stmt.label-1.sentence-2

(The attribute is on the label decl level, not on the label statement level. As best I can tell, there is no way to write an attribute on a label statement.)

C2x follows suit with their grammar as well.

The things I learn about these languages... :-D

xbolva00 updated this revision to Diff 407670.Feb 10 2022, 1:47 PM

Addressed review feedback

xbolva00 added inline comments.Feb 10 2022, 1:49 PM
clang/test/Sema/attr-nomerge.cpp
11

Ah, yeah, right

C++ standard is always cool to read = )

aaron.ballman accepted this revision.Feb 11 2022, 5:48 AM

LGTM, thank you!

This revision is now accepted and ready to land.Feb 11 2022, 5:48 AM
This revision was landed with ongoing or failed builds.Feb 11 2022, 6:51 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 6:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript