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 | 179306d57fcc813b18205a916f1cd448be610ded (patch) | |
| tree | a4b2c15a351163d31cc9de5adbc50330bfee7ab3 | |
| parent | a0d074425813daed19550b909275fd68f43975cf (diff) | |
| download | scintilla-mirror-179306d57fcc813b18205a916f1cd448be610ded.tar.gz | |
Backport: Move suppression of Clang warning missing-braces from makefile to apply to
lexers but not most other files.
Backport of changeset 7845:f3264e486266.
| -rw-r--r-- | gtk/makefile | 2 | ||||
| -rw-r--r-- | lexlib/LexerModule.h | 6 | ||||
| -rw-r--r-- | win32/makefile | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gtk/makefile b/gtk/makefile index cc9e918b2..83564bc9d 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 ab338bec6..1b3ad2f30 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 54eb0c587..e26ee6c5e 100644 --- a/win32/makefile +++ b/win32/makefile @@ -42,7 +42,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 |
