[ ] This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"
[ ] This bug exists for C
[x] This bug exists for C++
[ ] This bug exists for Objective-C
[ ] This bug exists for Objective-C++
The code with a problem is:
#pragma once
#include "../StandardIncludes.h"
class FillComponent : public juce::Component {
public:
explicit FillComponent(juce::Colour color) noexcept;
auto paint(juce::Graphics& g) noexcept -> void override;
inline auto setColor(juce::Colour color) noexcept -> void {
mColour = color;
}
inline auto getColour() const noexcept -> juce::Colour { // The noexcept on this line gets a different scope
return mColour;
}
#if defined(PACE_ENABLED)
DECLARE_SECURITY_FUNCTIONS();
#endif
private:
juce::Colour mColour;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FillComponent)
};
It looks like:
The noexcept on the line with the comment gets the following scopes:
variable.other.object.access.cpp
meta.head.function.definition.cpp
meta.function.definition.cpp
meta.body.class.cpp
meta.block.class.cpp
source.cpp
However, the other noexcepts have these scopes:
keyword.operator.noexcept.cpp
keyword.operator.wordlike.cpp
meta.head.function.definition.cpp
meta.function.definition.cpp
meta.body.class.cpp
meta.block.class.cpp
source.cpp
It should look like:
I would expect all noexcepts to have the same or similar scopes. However, I am not expert on noexcept.
Checklist
"C_Cpp.enhancedColorization": "Disabled"
The code with a problem is:
It looks like:
The
noexcept
on the line with the comment gets the following scopes: variable.other.object.access.cpp meta.head.function.definition.cpp meta.function.definition.cpp meta.body.class.cpp meta.block.class.cpp source.cppHowever, the other
noexcept
s have these scopes: keyword.operator.noexcept.cpp keyword.operator.wordlike.cpp meta.head.function.definition.cpp meta.function.definition.cpp meta.body.class.cpp meta.block.class.cpp source.cppIt should look like:
I would expect all
noexcept
s to have the same or similar scopes. However, I am not expert onnoexcept
.Originally from @braxtons12 in https://github.com/microsoft/vscode/issues/107172