-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect "Encapsulation not preserved" error #45
Comments
The nested class definitions is not handled correctly. Good catch!
One way to fix this is to update KWStyle/kwsParser.h/.cxx with a function
to determine scope and then FindArea should only find tags (public,
private, ...) that are at the same scope.
s
…On Tue, Nov 29, 2016 at 12:15 PM, Max Smolens ***@***.***> wrote:
With KWStyle.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<Description>
<InternalVariables>m_[A-Z],0,1</InternalVariables>
</Description>
and Outer.h:
class Outer
{
public:
Outer() {}
private:
class Inner
{
public:
Inner() {}
};
Inner m_Inner;
};
$ KWStyle -xml KWStyle.xml -v Outer.h -gcc
Processing Outer.h
Error #1 (0) Encapsulation not preserved
The error refers to the Inner m_Inner; line and suggests that the
internal variable m_Inner is not in a protected or private section.
However, it's clear that m_Inner is in private section.
Tested with ***@***.***
<0620fdd>
.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#45>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAREr8l7wL5Kigb8__BTeNuqfngE7NeAks5rDF2zgaJpZM4K_PSg>
.
--
====================================================
Stephen R. Aylward, Ph.D.
Senior Director of Operations, North Carolina, Kitware, Inc.
http://www.kitware.com and http://www.aylward.org
(919) 969-6990 x300
====================================================
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
KWStyle.xml
:and
Outer.h
:KWStyle shows an error:
The error refers to the
Inner m_Inner;
line and suggests that the internal variablem_Inner
is not in a protected or private section. However, it's clear that m_Inner is in a private section.Tested with 0620fdd.
The text was updated successfully, but these errors were encountered: