diff options
| author | Jonathan Coe <jbcoe@me.com> | 2016-11-03 13:52:09 +0000 |
|---|---|---|
| committer | Jonathan Coe <jbcoe@me.com> | 2016-11-03 13:52:09 +0000 |
| commit | 89f12c0c50dc6254b9df5a09e7cc116eddc4af86 (patch) | |
| tree | 2ca1e564a0bc1afe18d4f4588ea2b6ce76bc4eb1 /clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp | |
| parent | dd6abaad7562d6dc1a8f735e2647c35fcf74baa2 (diff) | |
| download | bcm5719-llvm-89f12c0c50dc6254b9df5a09e7cc116eddc4af86.tar.gz bcm5719-llvm-89f12c0c50dc6254b9df5a09e7cc116eddc4af86.zip | |
[clang-tidy] Ignore forward declarations without definitions in the same translation unit in readability-identifier-naming
Summary: This change ensures that forward declarations of classes are not considered for identifier naming checks within a translation unit.
Reviewers: alexfh, aaron.ballman
Subscribers: mgehre
Differential Revision: https://reviews.llvm.org/D22571
llvm-svn: 285907
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp')
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp b/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp index 5d865e88af5..1e59c6ada9d 100644 --- a/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp @@ -190,6 +190,11 @@ public: // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: invalid case style for class member 'ClassMember_2' // CHECK-FIXES: {{^}} static int ClassMember2;{{$}} }; +class my_class; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'my_class' +// CHECK-FIXES: {{^}}class CMyClass;{{$}} + +class my_forward_declared_class; // No warning should be triggered. const int my_class::classConstant = 4; // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: invalid case style for class constant 'classConstant' |

