This is an archive of the discontinued LLVM Phabricator instance.

[clang] Satisfy clang v12
ClosedPublic

Authored by ashay-github on Jul 10 2023, 11:21 AM.

Details

Summary

Older versions of clang (for example, v12) throw an error when compiling
CStringChecker.cpp that the initializers for SourceArgExpr,
DestinationArgExpr, and SizeArgExpr are missing braces around
initialization of subobject. Newer clang versions don't throw this
error. This patch adds the initialization braces to satisfy clang.

Diff Detail

Event Timeline

ashay-github created this revision.Jul 10 2023, 11:21 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: martong. · View Herald Transcript
ashay-github requested review of this revision.Jul 10 2023, 11:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 11:21 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steakhal accepted this revision.Jul 10 2023, 11:27 AM

Looks reasonable.
Unfortunate that it regresses readability by a pair of parents. Anyway LGTM.

This revision is now accepted and ready to land.Jul 10 2023, 11:27 AM

Rebased with main to trigger rebuild

This revision was landed with ongoing or failed builds.Jul 10 2023, 6:08 PM
This revision was automatically updated to reflect the committed changes.