diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2016-10-08 10:54:30 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2016-10-08 10:54:30 +0000 |
commit | 4eca0de7b7f470bf16ff4140132ff5711ab1da82 (patch) | |
tree | c0a6d8dc687a58347f8472151516393d7aac00a3 /clang/test/Analysis/copypaste/macros.cpp | |
parent | 46209e1dd08be5dfb5171648430196881a1fbc09 (diff) | |
download | bcm5719-llvm-4eca0de7b7f470bf16ff4140132ff5711ab1da82.tar.gz bcm5719-llvm-4eca0de7b7f470bf16ff4140132ff5711ab1da82.zip |
[analyzer] Re-apply r283094 "Improve CloneChecker diagnostics"
The parent commit (r283092) was reverted before and now finally landed.
llvm-svn: 283661
Diffstat (limited to 'clang/test/Analysis/copypaste/macros.cpp')
-rw-r--r-- | clang/test/Analysis/copypaste/macros.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/Analysis/copypaste/macros.cpp b/clang/test/Analysis/copypaste/macros.cpp index 170e034095d..db9b4c6ee2e 100644 --- a/clang/test/Analysis/copypaste/macros.cpp +++ b/clang/test/Analysis/copypaste/macros.cpp @@ -5,7 +5,7 @@ // to have the same complexity value. Macros have smaller complexity values // and need to be in their own hash group. -int foo(int a) { // expected-warning{{Detected code clone.}} +int foo(int a) { // expected-warning{{Duplicate code detected}} a = a + 1; a = a + 1 / 1; a = a + 1 + 1 + 1; @@ -15,7 +15,7 @@ int foo(int a) { // expected-warning{{Detected code clone.}} return a; } -int fooClone(int a) { // expected-note{{Related code clone is here.}} +int fooClone(int a) { // expected-note{{Similar code here}} a = a + 1; a = a + 1 / 1; a = a + 1 + 1 + 1; @@ -30,7 +30,7 @@ int fooClone(int a) { // expected-note{{Related code clone is here.}} #define ASSIGN(T, V) T = T + V -int macro(int a) { // expected-warning{{Detected code clone.}} +int macro(int a) { // expected-warning{{Duplicate code detected}} ASSIGN(a, 1); ASSIGN(a, 1 / 1); ASSIGN(a, 1 + 1 + 1); @@ -40,7 +40,7 @@ int macro(int a) { // expected-warning{{Detected code clone.}} return a; } -int macroClone(int a) { // expected-note{{Related code clone is here.}} +int macroClone(int a) { // expected-note{{Similar code here}} ASSIGN(a, 1); ASSIGN(a, 1 / 1); ASSIGN(a, 1 + 1 + 1); @@ -54,7 +54,7 @@ int macroClone(int a) { // expected-note{{Related code clone is here.}} #define EMPTY -int fooFalsePositiveClone(int a) { // expected-note{{Related code clone is here.}} +int fooFalsePositiveClone(int a) { // expected-note{{Similar code here}} a = EMPTY a + 1; a = a + 1 / 1; a = a + 1 + 1 + 1; |