From 242e04ab27600b54e276e4bf5f38d118b0537fd4 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 28 Apr 2020 13:57:47 +0100 Subject: [PATCH] Fix Wparentheses gcc warning. NFC. Wrap the 'anyof' hasAttribute checks so that we don't get precedence warnings with the assertion message. --- llvm/lib/IR/AsmWriter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 8a2777cf496d..1afc5c1fd928 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -4197,8 +4197,9 @@ void AssemblyWriter::writeAttribute(const Attribute &Attr, bool InAttrGroup) { return; } - assert(Attr.hasAttribute(Attribute::ByVal) || - Attr.hasAttribute(Attribute::Preallocated) && "unexpected type attr"); + assert((Attr.hasAttribute(Attribute::ByVal) || + Attr.hasAttribute(Attribute::Preallocated)) && + "unexpected type attr"); if (Attr.hasAttribute(Attribute::ByVal)) { Out << "byval";