summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/t4018/cpp-class-constructor1
-rw-r--r--t/t4018/cpp-class-constructor-mem-init1
-rw-r--r--t/t4018/cpp-class-destructor1
-rw-r--r--t/t4018/cpp-function-returning-global-type1
-rw-r--r--t/t4018/cpp-function-returning-nested1
-rw-r--r--t/t4018/cpp-function-returning-reference1
-rw-r--r--t/t4018/cpp-gnu-style-function1
-rw-r--r--t/t4018/cpp-namespace-definition1
-rw-r--r--t/t4018/cpp-operator-definition1
-rw-r--r--t/t4018/cpp-struct-single-line1
-rw-r--r--t/t4018/cpp-template-function-definition1
-rw-r--r--t/t4018/cpp-union-definition1
-rw-r--r--userdiff.c8
13 files changed, 3 insertions, 17 deletions
diff --git a/t/t4018/cpp-class-constructor b/t/t4018/cpp-class-constructor
index 4c4925c237..ec4f115c25 100644
--- a/t/t4018/cpp-class-constructor
+++ b/t/t4018/cpp-class-constructor
@@ -1,5 +1,4 @@
Item::Item(int RIGHT)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-class-constructor-mem-init b/t/t4018/cpp-class-constructor-mem-init
index eec1d7cbf3..49a69f37e1 100644
--- a/t/t4018/cpp-class-constructor-mem-init
+++ b/t/t4018/cpp-class-constructor-mem-init
@@ -2,5 +2,4 @@ Item::Item(int RIGHT) :
member(0)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-class-destructor b/t/t4018/cpp-class-destructor
index 03aa51ca5b..5487665096 100644
--- a/t/t4018/cpp-class-destructor
+++ b/t/t4018/cpp-class-destructor
@@ -1,5 +1,4 @@
RIGHT::~RIGHT()
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-function-returning-global-type b/t/t4018/cpp-function-returning-global-type
index bff3e5f21c..1084d5990e 100644
--- a/t/t4018/cpp-function-returning-global-type
+++ b/t/t4018/cpp-function-returning-global-type
@@ -1,5 +1,4 @@
::Item get::it::RIGHT()
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-function-returning-nested b/t/t4018/cpp-function-returning-nested
index 41700f2c09..d9750aa61a 100644
--- a/t/t4018/cpp-function-returning-nested
+++ b/t/t4018/cpp-function-returning-nested
@@ -1,6 +1,5 @@
get::Item get::it::RIGHT()
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-function-returning-reference b/t/t4018/cpp-function-returning-reference
index 29e2bd4632..01b051df70 100644
--- a/t/t4018/cpp-function-returning-reference
+++ b/t/t4018/cpp-function-returning-reference
@@ -1,5 +1,4 @@
string& get::it::RIGHT(char *ptr)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-gnu-style-function b/t/t4018/cpp-gnu-style-function
index d65fc7489c..08c7c7565a 100644
--- a/t/t4018/cpp-gnu-style-function
+++ b/t/t4018/cpp-gnu-style-function
@@ -2,5 +2,4 @@ const char *
RIGHT(int arg)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-namespace-definition b/t/t4018/cpp-namespace-definition
index 6b88dd9c3b..6749980241 100644
--- a/t/t4018/cpp-namespace-definition
+++ b/t/t4018/cpp-namespace-definition
@@ -1,5 +1,4 @@
namespace RIGHT
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-operator-definition b/t/t4018/cpp-operator-definition
index f2bd1678f9..1acd827159 100644
--- a/t/t4018/cpp-operator-definition
+++ b/t/t4018/cpp-operator-definition
@@ -1,5 +1,4 @@
Value operator+(Value LEFT, Value RIGHT)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-struct-single-line b/t/t4018/cpp-struct-single-line
index ad6fa8bbe9..a0de5fb800 100644
--- a/t/t4018/cpp-struct-single-line
+++ b/t/t4018/cpp-struct-single-line
@@ -5,4 +5,3 @@ void wrong()
struct RIGHT_iterator_tag {};
int ChangeMe;
-// broken
diff --git a/t/t4018/cpp-template-function-definition b/t/t4018/cpp-template-function-definition
index a410298b0b..0cdf5ba5bd 100644
--- a/t/t4018/cpp-template-function-definition
+++ b/t/t4018/cpp-template-function-definition
@@ -1,5 +1,4 @@
template<class T> int RIGHT(T arg)
{
ChangeMe;
- broken;
}
diff --git a/t/t4018/cpp-union-definition b/t/t4018/cpp-union-definition
index 133b662258..7ec94df697 100644
--- a/t/t4018/cpp-union-definition
+++ b/t/t4018/cpp-union-definition
@@ -1,5 +1,4 @@
union RIGHT {
double v;
int ChangeMe;
- broken;
};
diff --git a/userdiff.c b/userdiff.c
index 8830417e3b..fad52d6392 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -125,11 +125,9 @@ PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",
"\\\\[a-zA-Z@]+|\\\\.|[a-zA-Z0-9\x80-\xff]+"),
PATTERNS("cpp",
/* Jump targets or access declarations */
- "!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n"
- /* C/++ functions/methods at top level */
- "^([A-Za-z_][A-Za-z_0-9]*([ \t*]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n"
- /* compound type at top level */
- "^((struct|class|enum)[^;]*)$",
+ "!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])\n"
+ /* functions/methods, variables, and compounds at top level */
+ "^((::[[:space:]]*)?[A-Za-z_].*)$",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lLuU]*"