From 07f87b0a9047a4306a056f60d71d6d49388a3497 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 29 May 2023 09:12:32 -0700 Subject: [PATCH] Clang: -Wno-null-conversion for Lexer (#3333) ## Summary Silence a warning in the lexer used in the parser for Clang 12. ## Additional background ``` /g/g90/huebl1/src/warpx/build_lassen/_deps/fetchedamrex-src/Src/Base/Parser/amrex_iparser.lex.nolint.H:2010:68: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion] while ((yy_buffer_stack) ? yy_buffer_stack[yy_buffer_stack_top] : (__null)) { ... ``` et al. --- Src/Base/Parser/amrex_parser.lex.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/Base/Parser/amrex_parser.lex.cpp b/Src/Base/Parser/amrex_parser.lex.cpp index fffa52a4212..5d169da2f33 100644 --- a/Src/Base/Parser/amrex_parser.lex.cpp +++ b/Src/Base/Parser/amrex_parser.lex.cpp @@ -4,6 +4,7 @@ #pragma GCC diagnostic ignored "-Wfloat-conversion" #pragma GCC diagnostic ignored "-Wsign-compare" #elif defined(__clang__) +#pragma clang diagnostic ignored "-Wnull-conversion" #pragma clang diagnostic ignored "-Wnull-dereference" #pragma clang diagnostic ignored "-Wunreachable-code" #pragma clang diagnostic ignored "-Wfloat-conversion"