Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Implement FixitHints for identifier references in Identi…
…fierNamingCheck This diff requires http://reviews.llvm.org/D13079 to be applied first. I wasn't sure about how to make patch series in Phabricator, and I wanted to keep the two separate for clarity. It looks like that most cases can be supported with this patch. I'm not totally sure about the actual coverage though. I think that the matchers are very generic, but I'm still not totally fluent with the AST. Patch by Beren Minor! Differential revision: http://reviews.llvm.org/D13081 llvm-svn: 248996
- Loading branch information
Showing
4 changed files
with
224 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...g-tools-extra/test/clang-tidy/Inputs/readability-identifier-naming/system/system-header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef SYSTEM_HEADER_H | ||
#define SYSTEM_HEADER_H | ||
|
||
#define SYSTEM_MACRO(m) int m = 0 | ||
|
||
namespace SYSTEM_NS { | ||
class structure { | ||
int member; | ||
}; | ||
|
||
float global; | ||
|
||
void function() { | ||
} | ||
} | ||
|
||
#endif // SYSTEM_HEADER_H |
17 changes: 17 additions & 0 deletions
17
clang-tools-extra/test/clang-tidy/Inputs/readability-identifier-naming/user-header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef USER_HEADER_H | ||
#define USER_HEADER_H | ||
|
||
#define USER_MACRO(m) int m = 0 | ||
|
||
namespace USER_NS { | ||
class object { | ||
int member; | ||
}; | ||
|
||
float global; | ||
|
||
void function() { | ||
} | ||
} | ||
|
||
#endif // USER_HEADER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters