microsoft / microsoft/wil

WIL diagnostic level 2 not working

Open
#370 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
3k
Forks
300
Avg merge
19h 12m
Merged PRs (30d)
1

Description

            if (failure.pszFile != nullptr)
            {
                dest = details::LogStringPrintf(dest, destEnd, L"%hs(%u)[\\%hs!%p](file://%25hs!%25p): ", failure.pszFile, failure.uLineNumber, failure.pszModule, failure.returnAddress);
            }
            else
            {
                dest = details::LogStringPrintf(dest, destEnd, L"%hs!%p: ", failure.pszModule, failure.returnAddress);
            }

The code says “Well, if you don’t provide a file name, then I’m just going to log the module named and return address and not bother with a line number.”

Having said that, level 2 is pretty worthless, so maybe it should be removed with a #pragma error if that level is chosen.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the shown C++ diagnostic-formatting branch and trace how diagnostic level 2 reaches it. Determine the intended level-2 behavior from nearby diagnostic handling, then verify that the chosen behavior no longer silently omits the line number or leaves level 2 unusable; add or update the relevant diagnostic coverage if one is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.