summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-16 11:04:33 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-16 11:04:33 +0000
commit26eaef72d01e02df2da931d7b21cf0aa79103230 (patch)
treed210e5b3dbd739fe87784ac2d9ee052367adcbc6
parent0e31ed9058570d2e115c8bcd86c9b50612c94d13 (diff)
downloadbcm5719-llvm-26eaef72d01e02df2da931d7b21cf0aa79103230.tar.gz
bcm5719-llvm-26eaef72d01e02df2da931d7b21cf0aa79103230.zip
Hopefully avoid a warning on some GCCs (but not all strangely,
preventing me from seeing it initially). GCC doesn't use the unused attribute on members for anything, so while it works to suppress Clang's warning for an unused private member, it adds a GCC warning for the attribute. =/ Silence Clang's warning with a void cast in the constructor instead which doesn't trigger any complaints from GCC. llvm-svn: 206373
-rw-r--r--clang/include/clang/Basic/SourceManager.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h
index 886ba037773..73fd770f72d 100644
--- a/clang/include/clang/Basic/SourceManager.h
+++ b/clang/include/clang/Basic/SourceManager.h
@@ -97,7 +97,7 @@ namespace SrcMgr {
// important. It is quite awkward to fit this aligner into any other part
// of the class due to the lack of portable ways to combine it with other
// members.
- llvm::AlignedCharArray<8, 1> NonceAligner LLVM_ATTRIBUTE_UNUSED;
+ llvm::AlignedCharArray<8, 1> NonceAligner;
/// \brief The actual buffer containing the characters from the input
/// file.
@@ -146,7 +146,9 @@ namespace SrcMgr {
ContentCache(const FileEntry *Ent = 0)
: Buffer(0, false), OrigEntry(Ent), ContentsEntry(Ent),
SourceLineCache(0), NumLines(0), BufferOverridden(false),
- IsSystemFile(false) {}
+ IsSystemFile(false) {
+ (void)NonceAligner; // Silence warnings about unused member.
+ }
ContentCache(const FileEntry *Ent, const FileEntry *contentEnt)
: Buffer(0, false), OrigEntry(Ent), ContentsEntry(contentEnt),
OpenPOWER on IntegriCloud