This is an archive of the discontinued LLVM Phabricator instance.

[libc++][NFC] Use `#error message` instead of `#error "message"`
AbandonedPublic

Authored by ldionne on Aug 24 2022, 12:38 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Restricted Project
Summary

Even though I've always used the latter, the former is the more correct
way to use the preprocessing directive, since the compiler expects a
sequence of 'pp-tokens'.

Diff Detail

Event Timeline

ldionne created this revision.Aug 24 2022, 12:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 12:38 PM
ldionne requested review of this revision.Aug 24 2022, 12:38 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 24 2022, 12:38 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript

Are you sure we want to do this? This breaks if you have any 's in your message. Couldn't clang just remove the " when the only thing in the error message is a string?

Are you sure we want to do this? This breaks if you have any 's in your message. Couldn't clang just remove the " when the only thing in the error message is a string?

That is a *much* better idea indeed.

ldionne abandoned this revision.Aug 25 2022, 6:10 AM