Util.h 549 B

1234567891011121314151617
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef TOOLS_CLANG_PLUGINS_UTIL_H_
  5. #define TOOLS_CLANG_PLUGINS_UTIL_H_
  6. #include <string>
  7. #include "clang/AST/DeclBase.h"
  8. // Utility method for subclasses to determine the namespace of the
  9. // specified record, if any. Unnamed namespaces will be identified as
  10. // "<anonymous namespace>".
  11. std::string GetNamespace(const clang::Decl* record);
  12. #endif // TOOLS_CLANG_PLUGINS_UTIL_H_