[analyzer] Fix a strange compile error on a certain Clang-7.0.0
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 11 Mar 2020 12:53:10 +0000 (15:53 +0300)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 11 Mar 2020 13:54:34 +0000 (16:54 +0300)
error: default initialization of an object of const type
       'const clang::QualType' without a user-provided
       default constructor

  Irrelevant; // A placeholder, whenever we do not care about the type.
  ^
            {}

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

index 6080157..d52b3f3 100644 (file)
@@ -500,7 +500,7 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
   // or long long, so three summary variants would be enough).
   // Of course, function variants are also useful for C++ overloads.
   const QualType
-      Irrelevant; // A placeholder, whenever we do not care about the type.
+      Irrelevant{}; // A placeholder, whenever we do not care about the type.
   const QualType IntTy = ACtx.IntTy;
   const QualType LongTy = ACtx.LongTy;
   const QualType LongLongTy = ACtx.LongLongTy;