CocoaConventions.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CocoaConventions.h - Special handling of Cocoa conventions -*- C++ -*--//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file implements cocoa naming convention analysis.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_CLANG_ANALYSIS_DOMAINSPECIFIC_COCOACONVENTIONS_H
  18. #define LLVM_CLANG_ANALYSIS_DOMAINSPECIFIC_COCOACONVENTIONS_H
  19. #include "clang/Basic/LLVM.h"
  20. #include "llvm/ADT/StringRef.h"
  21. namespace clang {
  22. class FunctionDecl;
  23. class QualType;
  24. namespace ento {
  25. namespace cocoa {
  26. bool isRefType(QualType RetTy, StringRef Prefix,
  27. StringRef Name = StringRef());
  28. bool isCocoaObjectRef(QualType T);
  29. }
  30. namespace coreFoundation {
  31. bool isCFObjectRef(QualType T);
  32. bool followsCreateRule(const FunctionDecl *FD);
  33. }
  34. }} // end: "clang:ento"
  35. #endif
  36. #ifdef __GNUC__
  37. #pragma GCC diagnostic pop
  38. #endif