This is an archive of the discontinued LLVM Phabricator instance.

[clang][index] Mark file as C++ in parse-all-comments test
ClosedPublic

Authored by jansvoboda11 on Feb 2 2021, 9:32 AM.

Details

Summary

CompilerInvocation::CreateFromArgs doesn't always report command line parsing failures through the return value. Sometimes, errors are only reported via diagnostics.

Some clients like c-index-test only check the return value and don't check the state of DiagnosticsEngine.

If we were to start returning the correct return value from CreateFromArgs, this index test starts to fail, because it specifies -std=c++11 for a C input, which is invalid.

This patch fixes that issue by adding forgotten -x c++ argument.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Feb 2 2021, 9:32 AM
jansvoboda11 requested review of this revision.Feb 2 2021, 9:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2021, 9:32 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Feb 2 2021, 10:37 AM
This revision was landed with ongoing or failed builds.Feb 8 2021, 12:43 AM
This revision was automatically updated to reflect the committed changes.