This is an archive of the discontinued LLVM Phabricator instance.

Don't normalise CXX11/C2X attribute names to start with ::
ClosedPublic

Authored by john.brawn on Mar 24 2020, 7:25 AM.

Details

Summary

Currently square-bracket-style (CXX11/C2X) attribute names are normalised to start with :: if they don't have a namespace. This is a bit odd, as such names are rejected when parsing, so don't do this.

Diff Detail

Event Timeline

john.brawn created this revision.Mar 24 2020, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 7:25 AM
aaron.ballman accepted this revision.Mar 24 2020, 10:51 AM

LGTM, thank you for this cleanup!

clang/lib/Basic/Attributes.cpp
89–91

I think we should add an assert that the syntax used is either CXX11 or C2x if the scope name is not empty.

This revision is now accepted and ready to land.Mar 24 2020, 10:51 AM
This revision was automatically updated to reflect the committed changes.