Skip to content

Commit

Permalink
Fix misleading-indentation compilation error under clang 10 (dotnet#3…
Browse files Browse the repository at this point in the history
…3406)

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.
  • Loading branch information
omajid authored Mar 10, 2020
1 parent 197d24e commit 29cd9a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/coreclr/src/tools/metainfo/mdinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 29cd9a5

Please sign in to comment.