forked from OSchip/llvm-project
[clang-tidy] Allows the prevailing include header guard in Flang to be recognized rather than flagged as a violation in phabricator.
Differential revision: https://reviews.llvm.org/D82807
This commit is contained in:
parent
51e92b223b
commit
e158154087
|
@ -54,6 +54,10 @@ std::string LLVMHeaderGuardCheck::getHeaderGuard(StringRef Filename,
|
|||
if (StringRef(Guard).startswith("clang"))
|
||||
Guard = "LLVM_" + Guard;
|
||||
|
||||
// The prevalent style in flang is FORTRAN_FOO_BAR_H
|
||||
if (StringRef(Guard).startswith("flang"))
|
||||
Guard = "FORTRAN" + Guard.substr(sizeof("flang") - 1);
|
||||
|
||||
return StringRef(Guard).upper();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue