This is an archive of the discontinued LLVM Phabricator instance.

[clang][extract-api] Use correct language info from inputs
ClosedPublic

Authored by zixuw on Mar 25 2022, 11:47 AM.

Details

Summary

The current way of getting the clang::Language from LangOptions does
not handle Objective-C correctly because clang::Language::ObjC does
not correspond to any LangStandard. This patch passes the correct
Language from the frontend input information.

Diff Detail

Event Timeline

zixuw created this revision.Mar 25 2022, 11:47 AM
Herald added a project: Restricted Project. · View Herald Transcript
zixuw requested review of this revision.Mar 25 2022, 11:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2022, 11:47 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dang added inline comments.Mar 28 2022, 4:23 AM
clang/include/clang/ExtractAPI/API.h
312

Nit: "by" isn't great here, maybe something along the lines of "Get the language the APIs are defined in."

341

const ?

zixuw marked 2 inline comments as done.Mar 28 2022, 4:23 PM
zixuw added inline comments.
clang/include/clang/ExtractAPI/API.h
312

Whops! Missed a 'used' while moving the change from the other patch.

zixuw updated this revision to Diff 418724.Mar 28 2022, 4:23 PM
zixuw marked an inline comment as done.

Address review issues.

dang accepted this revision.Mar 29 2022, 10:03 AM

LGTM!

This revision is now accepted and ready to land.Mar 29 2022, 10:03 AM
This revision was landed with ongoing or failed builds.Mar 29 2022, 10:06 AM
This revision was automatically updated to reflect the committed changes.