Skip to content

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

@mihaipopescu

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.

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