Skip to content

Spooky action at a distance. The ampersand in a function pointer becomes a CT_ARITH if a specific code follows. #1284

Closed

Description

@mihaipopescu

Expected versus output diff:

diff --git "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60027-UNI-21506.cpp" "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60027-UNI-21506.cpp"
index f9e3349..6f48c02 100644
--- "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60027-UNI-21506.cpp"
+++ "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60027-UNI-21506.cpp"
@@ -1,13 +1,13 @@
 struct bar
 {
-    void (Namespace::*method)(Class& param);
+    void (Namespace::*method)(Class & param);
 };
 
-void Class::Foo(void (*callback)(const Class& entry))
+void Class::Foo(void (*callback)(const Class&entry))
 {
 }
 
 void foo()
 {
     int a = 1;  // if you comment this out, the bug stops reproducing
 }

Debug support files:

60027-UNI-21506.cpp
60027-UNI-21506.cpp.log
60027-UNI-21506.cpp.unc
Uncrustify.Cpp.cfg
UNI-21506.cpp

Disclaimer:

Note: This is a generated issue from our internal issue tracker.
Expect a dry description which could be insufficient to properly understand the issue.
On the other hand, the support files should be sufficient to easily reproduce and debug the issue,
but please comment if it's still unclear and I will get back with clarifications.
See main discussion thread here #1223.

Activity

  1. spuppala-rythmos commented on Dec 26, 2017

    @spuppala-rythmos

    In unity fork this issue is addressed with below PR
    Unity-Technologies#34

  2. gmaurel commented on Feb 13, 2018

    @gmaurel
    Collaborator

    Fixed at 78af3bb, on Dec 19 16:03:19 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions