From: Omair Majid Date: Tue, 10 Mar 2020 07:13:14 +0000 (-0400) Subject: Fix misleading-indentation compilation error under clang 10 (#33406) X-Git-Tag: submit/tizen/20210909.063632~9254 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29cd9a5c6fee624594a93bffd7b32b379ffe94cc;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix misleading-indentation compilation error under clang 10 (#33406) The error looks like this (seen in dotnet/coreclr repo): In file included from /root/coreclr/src/ildasm/dasm_mi.cpp:7: /root/coreclr/src/ildasm/exe/../../tools/metainfo/mdinfo.cpp:1951:9: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (!wcscmp(W("__DecoratedName"), rcName)) ^ /root/coreclr/src/ildasm/exe/../../tools/metainfo/mdinfo.cpp:1947:5: note: previous statement is here if (pSig && pMethName) ^ 1 error generated. --- diff --git a/src/coreclr/src/tools/metainfo/mdinfo.cpp b/src/coreclr/src/tools/metainfo/mdinfo.cpp index 8d693d7..e04134b 100644 --- a/src/coreclr/src/tools/metainfo/mdinfo.cpp +++ b/src/coreclr/src/tools/metainfo/mdinfo.cpp @@ -1945,11 +1945,11 @@ void MDInfo::DisplayCustomAttributeInfo(mdCustomAttribute inValue, const char *p VWrite(" :: %S", qSigName.Ptr()); // Keep track of coff overhead. - if (!wcscmp(W("__DecoratedName"), rcName)) - { - bCoffSymbol = true; - g_cbCoffNames += cbValue + 6; - } + if (!wcscmp(W("__DecoratedName"), rcName)) + { + bCoffSymbol = true; + g_cbCoffNames += cbValue + 6; + } WriteLine(""); VWriteLine("%s\tLength: %ld", preFix, cbValue);