[SOLVED] Building with LLVM 17.0.1 raises warning

After upgrading to LLVM 17.0.1 (from LLVM 16.0.6), building with JUCE 7.0.7 gives lots of warnings, such as:

D:/a/ZLEComp/ZLEComp/JUCE/modules\juce_gui_basics/layout/juce_Grid.h:219:31: warning: identifier '_px' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  219 | constexpr Grid::Px operator"" _px (long double px)          { return Grid::Px { px }; }
      |                    ~~~~~~~~~~~^~~
      |                    operator""_px
D:/a/ZLEComp/ZLEComp/JUCE/modules\juce_gui_basics/layout/juce_Grid.h:220:31: warning: identifier '_px' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  220 | constexpr Grid::Px operator"" _px (unsigned long long px)   { return Grid::Px { px }; }
      |                    ~~~~~~~~~~~^~~
      |                    operator""_px
D:/a/ZLEComp/ZLEComp/JUCE/modules\juce_gui_basics/layout/juce_Grid.h:221:31: warning: identifier '_fr' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  221 | constexpr Grid::Fr operator"" _fr (unsigned long long fr)   { return Grid::Fr { fr }; }
      |                    ~~~~~~~~~~~^~~
      |                    operator""_fr
D:/a/ZLEComp/ZLEComp/JUCE/modules\juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h:517:21: warning: declaration shadows a local variable [-Wshadow-uncaptured-local]
  517 |             return [func = std::move (func)] (float v, int) { return func (v); };
      |                     ^
D:/a/ZLEComp/ZLEComp/JUCE/modules\juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h:512:97: note: previous declaration is here
  512 |         static std::function<String (float, int)> adaptSignature (std::function<String (float)> func)
      |             

See here for details. Although the plugin still works well, these warning messages are a bit annoying.

@t0m would you possibly accept a pull request for this? Most of those are trivial to fix (remove a single whitespace character) and it wouldn’t affect anything.

Sorry for the delay - we have a commit ready to go on Monday.

Whilst looking at this we fixed some other issues causing more serious problems for people attempting to use earlier versions of LLVM on macOS with Xcode 15, so this slowed us down a bit.

1 Like