From 6cef91733c7878da84548f8175a60a3b9dfb28cc Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 20 Sep 2019 00:16:32 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372363 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/AttributeCommonInfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/Basic/AttributeCommonInfo.h b/include/clang/Basic/AttributeCommonInfo.h index c8fc0a5a04..545e7e9a2b 100644 --- a/include/clang/Basic/AttributeCommonInfo.h +++ b/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, -- cgit v1.2.1