diff options
author | Neil <nyamatongwe@gmail.com> | 2019-12-29 10:02:31 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-12-29 10:02:31 +1100 |
commit | 2ba73fb5102f510c93f69a9a4b34954227eddca6 (patch) | |
tree | 860904fbb0ca4ecd1a2bf6a61e29fe51cdac4bd7 | |
parent | 6c254c94360737545f2817740c87569e22cac0b1 (diff) | |
download | scintilla-mirror-2ba73fb5102f510c93f69a9a4b34954227eddca6.tar.gz |
Move suppression of Clang warning missing-braces from makefile to apply to
lexers but not most other files.
-rw-r--r-- | gtk/makefile | 2 | ||||
-rw-r--r-- | lexlib/LexerModule.h | 6 | ||||
-rw-r--r-- | win32/makefile | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/gtk/makefile b/gtk/makefile index f9ed251c1..dd030061d 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -13,7 +13,7 @@ srcdir ?= . ifdef CLANG CXX = clang++ -CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register -Wno-missing-braces +CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register CC = clang # Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for # thread also need to create Position Independent Executable -> search online documentation diff --git a/lexlib/LexerModule.h b/lexlib/LexerModule.h index e1d65e703..a6dda61ed 100644 --- a/lexlib/LexerModule.h +++ b/lexlib/LexerModule.h @@ -82,6 +82,12 @@ inline int Maximum(int a, int b) { #pragma GCC diagnostic ignored "-Wshadow" #endif +// Clang doesn't like omitting braces in array initialization but they just add +// noise to LexicalClass arrays in lexers +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wmissing-braces" +#endif + } #endif diff --git a/win32/makefile b/win32/makefile index e708549e0..cd02f9dcf 100644 --- a/win32/makefile +++ b/win32/makefile @@ -15,8 +15,6 @@ LIBSCI = $(DIR_BIN)/libscintilla.a ifdef CLANG CXX = clang++ -# Clang doesn't like omitting braces in array initialization but they just add noise, -CLANG_OPTS = -Wno-missing-braces else # MinGW GCC LIBSMINGW = -lstdc++ @@ -41,7 +39,7 @@ LIBS=-lgdi32 -luser32 -limm32 -lole32 -luuid -loleaut32 -lmsimg32 $(LIBSMINGW) # Add -MMD to get dependencies INCLUDEDIRS=-I ../include -I ../src -I../lexlib -CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) -D_CRT_SECURE_NO_DEPRECATE=1 $(CLANG_OPTS) +CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) -D_CRT_SECURE_NO_DEPRECATE=1 ifdef NO_CXX11_REGEX REFLAGS=-DNO_CXX11_REGEX |