[PATCH] D42704: [clang-format] Do not break Objective-C string literals inside array literals

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 15:10:46 PST 2018


benhamilton added a comment.

@stephanemoore: It appears all warnings are enabled by default unless they are in class `DefaultIgnore`:

https://github.com/llvm-mirror/clang/blob/6de2efd1953adaa9a190b2cdfbe7b5c15f6d6efe/include/clang/Basic/Diagnostic.td#L105

This diagnostic is not in `DefaultIgnore`:

https://github.com/llvm-mirror/clang/blob/a58d0437d1e17d53d7bffea598d77789dd6d28b6/include/clang/Basic/DiagnosticGroups.td#L933

In fact, the `All` class is specifically for warnings which *are* in `DefaultIgnore` but which should be emitted with `-Wall`:

https://github.com/llvm-mirror/clang/blob/a58d0437d1e17d53d7bffea598d77789dd6d28b6/include/clang/Basic/DiagnosticGroups.td#L782

  // Note that putting warnings in -Wall will not disable them by default. If a
  // warning should be active _only_ when -Wall is passed in, mark it as
  // DefaultIgnore in addition to putting it here.


Repository:
  rC Clang

https://reviews.llvm.org/D42704





More information about the cfe-commits mailing list