-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
Checklist
- This problem exists even with the setting
"C_Cpp.enhancedColorization": "Disabled"
- This bug exists for C
- This bug exists for C++
- This bug exists for Objective-C
- This bug exists for Objective-C++
The code with a problem is:
#include "rob.hh"
template <class Impl>
void
ROB<Impl>::insertInst(DynInstPtr &inst) // Scope of inst is only source.cpp
{
assert(inst);
DPRINTF("blah", inst->pcState());
auto tid = inst->threadNumber;
bool instTracked = cpu->trackInsts.find(inst->pcState().instAddr()) != cpu->trackInsts.end();
}
When you place ROB<
... on the same line as void
(i.e., place the function declaration all on one line), the scope of inst
changes (becomes more correct).
It looks like:
It should look like:
Originally reported by @rchoudhary in microsoft/vscode#101173