Skip to content
Permalink
Browse files

[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
  • Loading branch information
xiaobai committed Sep 20, 2019
1 parent dd74f48 commit 466fb68fce10d34963c2fd651de32bd3a4ddcd1f
Showing with 2 additions and 2 deletions.
  1. +2 −2 clang/include/clang/Basic/AttributeCommonInfo.h
@@ -74,11 +74,11 @@ class AttributeCommonInfo {

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,

0 comments on commit 466fb68

Please sign in to comment.
You can’t perform that action at this time.