build+ci: sync compilation flags and Travis-CI matrix with ndn-cxx

Change-Id: I49c7069bf1fcc1bf89c91a5f92cd830730a32a87
Refs: #4721
diff --git a/.travis.yml b/.travis.yml
index 2ac52ac..0955d2a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,8 @@
       env: COMPILER=clang++-6.0
     - os: linux
       env: COMPILER=clang++-7
+    - os: linux
+      env: COMPILER=clang++-8
 
     # macOS/clang
     # https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
@@ -55,10 +57,14 @@
     - os: osx
       osx_image: xcode9.4
       env: OSX_VERSION=10.13
+    - os: osx
+      osx_image: xcode10
+      env: OSX_VERSION=10.13
 
   allow_failures:
     - env: COMPILER=clang++-3.6
     - env: COMPILER=clang++-3.7 DISABLE_ASAN=yes
+    - env: COMPILER=clang++-8
 
   fast_finish: true
 
@@ -72,8 +78,8 @@
       clang++-*)
         CLANG_VERSION=${COMPILER/clang++}
         if [[ ${CLANG_VERSION} != "-3."* ]]; then
-          wget -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
-          travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${CLANG_VERSION/-7} main"
+          travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
+          travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${CLANG_VERSION/-8} main"
         fi
         travis_retry sudo apt-get -qq update
         travis_retry sudo apt-get -qy install "clang${CLANG_VERSION}"
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 2be9d90..6b53d3c 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -186,15 +186,13 @@
         flags['CXXFLAGS'] += ['-fcolor-diagnostics',
                               '-Wextra-semi',
                               '-Wundefined-func-template',
-                              '-Wno-error=deprecated-register',
-                              '-Wno-error=infinite-recursion', # Bug #3358
-                              '-Wno-error=keyword-macro', # Bug #3235
-                              '-Wno-error=unneeded-internal-declaration', # Bug #1588
                               '-Wno-unused-local-typedef', # Bugs #2657 and #3209
                               ]
         version = self.getCompilerVersion(conf)
         if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
             flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
+        if version < (6, 0, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
         return flags
 
     def getOptimizedFlags(self, conf):
@@ -207,4 +205,6 @@
         version = self.getCompilerVersion(conf)
         if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
             flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
+        if version < (6, 0, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
         return flags