From 466fb68fce10d34963c2fd651de32bd3a4ddcd1f Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 20 Sep 2019 00:16:32 +0000 Subject: [PATCH] [NFCI] Always initialize const members of AttributeCommonInfo Some compilers require that const fields of an object must be explicitly initialized by the constructor. I ran into this issue building with clang 3.8 on Ubuntu 16.04. llvm-svn: 372363 --- clang/include/clang/Basic/AttributeCommonInfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/AttributeCommonInfo.h b/clang/include/clang/Basic/AttributeCommonInfo.h index c8fc0a5a044b..545e7e9a2b47 100644 --- a/clang/include/clang/Basic/AttributeCommonInfo.h +++ b/clang/include/clang/Basic/AttributeCommonInfo.h @@ -74,11 +74,11 @@ protected: public: AttributeCommonInfo(SourceRange AttrRange) - : AttrRange(AttrRange), AttrKind(0), SyntaxUsed(0), + : AttrRange(AttrRange), ScopeLoc(), AttrKind(0), SyntaxUsed(0), SpellingIndex(SpellingNotCalculated) {} AttributeCommonInfo(SourceLocation AttrLoc) - : AttrRange(AttrLoc), AttrKind(0), SyntaxUsed(0), + : AttrRange(AttrLoc), ScopeLoc(), AttrKind(0), SyntaxUsed(0), SpellingIndex(SpellingNotCalculated) {} AttributeCommonInfo(const IdentifierInfo *AttrName,