[clang] edbf2fd - [analyzer] Fix a strange compile error on a certain Clang-7.0.0

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 06:54:45 PDT 2020


Author: Artem Dergachev
Date: 2020-03-11T16:54:34+03:00
New Revision: edbf2fde14a2b50e64ea20a011b2a3242c75b4d9

URL: https://github.com/llvm/llvm-project/commit/edbf2fde14a2b50e64ea20a011b2a3242c75b4d9
DIFF: https://github.com/llvm/llvm-project/commit/edbf2fde14a2b50e64ea20a011b2a3242c75b4d9.diff

LOG: [analyzer] Fix a strange compile error on a certain Clang-7.0.0

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.
  ^
            {}

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
index 608015781c49..d52b3f371af9 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
@@ -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;


        


More information about the cfe-commits mailing list