Author: xiaobai Date: Thu Sep 19 17:16:32 2019 New Revision: 372363 URL: http://llvm.org/viewvc/llvm-project?rev=372363&view=rev Log: [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. Modified: cfe/trunk/include/clang/Basic/AttributeCommonInfo.h Modified: cfe/trunk/include/clang/Basic/AttributeCommonInfo.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttributeCommonInfo.h?rev=372363&r1=372362&r2=372363&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/AttributeCommonInfo.h (original) +++ cfe/trunk/include/clang/Basic/AttributeCommonInfo.h Thu Sep 19 17:16:32 2019 @@ -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, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits