This is an archive of the discontinued LLVM Phabricator instance.

Put macro redefinition warnings under -Wmacro-redefined
ClosedPublic

Authored by rnk on Apr 3 2014, 3:58 PM.

Details

Summary

This is consistent with -Wbuiltin-macro-redefined, and puts this common
extension warning under a flag.

Diff Detail

Event Timeline

rsmith accepted this revision.Apr 3 2014, 4:57 PM

LGTM

include/clang/Basic/DiagnosticGroups.td
51–52

Do you think there's value in making BuiltinMacroRedefined a subgroup of MacroRedefined? I'm torn here -- logically one is a subset of the other, but redefining a builtin macro is a more serious offense.

rnk added a comment.Apr 3 2014, 5:16 PM

Thanks!

include/clang/Basic/DiagnosticGroups.td
51–52

I'd leave it as is. No need to impose artificial hierarchy. Users might accidentally suppress -Wbuiltin-macro-redefined with -Wno-macro-redefined.

rnk closed this revision.Apr 3 2014, 5:24 PM

Closed by commit rL205591 (authored by @rnk).