From f1d3061ef8ea87c95950287cfc3027fef6772ea4 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Mon, 29 Oct 2018 21:21:55 +0000 Subject: Add parens to fix incorrect assert check. && has higher priority than ||, so this assert works really oddly. Add parens to match the programmer's intent. Change-Id: I3abe1361ee0694462190c5015779db664012f3d4 llvm-svn: 345543 --- llvm/lib/Support/VirtualFileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/VirtualFileSystem.cpp') diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index c9920197fba6..81ac5bbaa9cb 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -2118,7 +2118,7 @@ std::error_code VFSFromYamlDirIterImpl::incrementExternal() { } std::error_code VFSFromYamlDirIterImpl::incrementContent(bool IsFirstTime) { - assert(IsFirstTime || Current != End && "cannot iterate past end"); + assert((IsFirstTime || Current != End) && "cannot iterate past end"); if (!IsFirstTime) ++Current; while (Current != End) { -- cgit v1.2.3