This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Disable -Wmisleading-indentation when using gcc
Needs RevisionPublic

Authored by vabridgers on Aug 28 2021, 3:56 AM.

Details

Reviewers
MaskRay
Summary

gcc doesn't handle -Wmisleading-indentation correctly, leading to
warnings when using gcc. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81334 for details. This
change disables -Wmisleading-indentation to avoid warnings when using
gcc, and leaves it enabled for other compilers. This can be re-enabled
when gcc behaves as expected.

Diff Detail

Event Timeline

vabridgers created this revision.Aug 28 2021, 3:56 AM
vabridgers requested review of this revision.Aug 28 2021, 3:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2021, 3:56 AM

Consider using CHECK_CXX_SOURCE_COMPILES to check the GCC issue.
Also, please add a gcc.gnu.org/PRxxx comment.

(Thanks for taking a look at this - saw a bunch of those notes about misleading indentation on a recent gcc build)

MaskRay requested changes to this revision.May 10 2022, 11:03 AM
This revision now requires changes to proceed.May 10 2022, 11:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 11:03 AM
Herald added a subscriber: StephenFan. · View Herald Transcript